Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
vcsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Kevin Lyda
vcsh
Commits
0da954dc
Commit
0da954dc
authored
7 years ago
by
Roland Hopferwieser
Browse files
Options
Downloads
Patches
Plain Diff
Fix output if no aliases
parent
6cbe621c
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
vcsh
+6
-3
6 additions, 3 deletions
vcsh
with
6 additions
and
3 deletions
vcsh
+
6
−
3
View file @
0da954dc
...
@@ -156,14 +156,15 @@ info() {
...
@@ -156,14 +156,15 @@ info() {
}
}
alias_read
()
{
alias_read
()
{
local
aliases
=
local
aliases
if
[
-r
"
$XDG_CONFIG_HOME
/vcsh/aliases"
]
;
then
if
[
-r
"
$XDG_CONFIG_HOME
/vcsh/aliases"
]
;
then
aliases
=
"
$XDG_CONFIG_HOME
/vcsh/aliases"
aliases
=
"
$XDG_CONFIG_HOME
/vcsh/aliases"
elif
[
-r
/etc/vcsh/aliases
]
;
then
elif
[
-r
/etc/vcsh/aliases
]
;
then
aliases
=
/etc/vcsh/aliases
aliases
=
/etc/vcsh/aliases
else
return
fi
fi
[
-z
"
$aliases
"
]
&&
return
sed
-r
-e
's/#.*//'
-ne
's/(\w+)\s*=\s*(.+)/\1 \2/p'
"
$aliases
"
sed
-r
-e
's/#.*//'
-ne
's/(\w+)\s*=\s*(.+)/\1 \2/p'
"
$aliases
"
}
}
...
@@ -202,7 +203,9 @@ aliases() {
...
@@ -202,7 +203,9 @@ aliases() {
else
else
local
a cmd
local
a cmd
while
read
a cmd
;
do
while
read
a cmd
;
do
if
[
-n
"
$a
"
]
;
then
echo
$a
=
$cmd
echo
$a
=
$cmd
fi
done
<<<
"
$(
alias_read
)
"
done
<<<
"
$(
alias_read
)
"
fi
fi
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment