Skip to content

Commit 69269da

Browse files
committed
Remove ==
1 parent 35eea7f commit 69269da

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

vcsh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ alias_get() {
172172
local a cmd
173173
if [ -n "$1" ]; then
174174
alias_read | while read a cmd; do
175-
if [ x"$1" == x"$a" ]; then
175+
if [ x"$1" = x"$a" ]; then
176176
echo $cmd
177177
return
178178
fi
@@ -184,7 +184,7 @@ alias_write() {
184184
[ -w "$XDG_CONFIG_HOME/vcsh/aliases" ] ||
185185
[ ! -e "$XDG_CONFIG_HOME/vcsh/aliases" -a -w "$XDG_CONFIG_HOME/vcsh/" ] ||
186186
fatal "File '$XDG_CONFIG_HOME/vcsh/aliases' not writeable"
187-
[ "$2" == '=' ] || fatal 'Invalid alias format'
187+
[ "$2" = '=' ] || fatal 'Invalid alias format'
188188
if [ -n "$(alias_get $1)" ]; then
189189
local regex="s/^$1\s*=.*/$@/"
190190
sed -i.bak -re "$regex" "$XDG_CONFIG_HOME/vcsh/aliases"
@@ -206,12 +206,12 @@ aliases() {
206206
if [ -n "$1" ]; then
207207
local opts subcmd
208208
while getopts d: opts; do
209-
if [ $opts == d ]; then
209+
if [ $opts = d ]; then
210210
alias_remove "$OPTARG"
211211
fi
212212
done
213213
shift $(($OPTIND - 1))
214-
local alias=$(echo "$@" | sed -nre 's/(\w+)\s*=\s*(\w.*)/\1 = \2/p')
214+
local alias="$(echo "$@" | sed -nre 's/(\w+)\s*=\s*(\w.*)/\1 = \2/p')"
215215
if [ -n "$alias" ]; then
216216
alias_write $alias
217217
else

0 commit comments

Comments
 (0)