File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments