fix: sed regexes; bug introduced with fe1cc9805

This commit is contained in:
Jorge Bucaran 2019-01-22 10:13:32 +09:00
parent 12ee3cb33e
commit db82938731
No known key found for this signature in database
GPG key ID: E54BA3C0E646DB30

View file

@ -119,7 +119,7 @@ function _fisher_fmt
end end
function _fisher_version -a file function _fisher_version -a file
echo "fisher version $fisher_version $file" | command sed "s|^$HOME|~|" echo "fisher version $fisher_version $file" | command sed "s|$HOME|~|"
end end
function _fisher_help function _fisher_help
@ -157,7 +157,7 @@ function _fisher_self_update -a file
end end
echo "fisher is already up-to-date" >&2 echo "fisher is already up-to-date" >&2
case \* case \*
echo "linking $file" | command sed "s|^$HOME|~|" >&2 echo "linking $file" | command sed "s|$HOME|~|" >&2
command mv -f $file. $file command mv -f $file. $file
source $file source $file
echo "updated to $fisher_version -- hooray!" >&2 echo "updated to $fisher_version -- hooray!" >&2
@ -173,7 +173,7 @@ function _fisher_self_uninstall
for file in $fisher_cache $fisher_config $fisher_path/{functions,completions,conf.d}/fisher.fish $fisher_path/fishfile for file in $fisher_cache $fisher_config $fisher_path/{functions,completions,conf.d}/fisher.fish $fisher_path/fishfile
echo "removing $file" echo "removing $file"
command rm -Rf $file 2>/dev/null command rm -Rf $file 2>/dev/null
end | command sed "s|^$HOME|~|" >&2 end | command sed "s|$HOME|~|" >&2
for name in (set -n | command awk '/^fisher_/') for name in (set -n | command awk '/^fisher_/')
set -e "$name" set -e "$name"
@ -190,7 +190,7 @@ function _fisher_commit -a cmd
if test ! -e "$fishfile" if test ! -e "$fishfile"
command touch $fishfile command touch $fishfile
echo "created new fishfile in $fishfile" | command sed "s|^$HOME|~|" >&2 echo "created new fishfile in $fishfile" | command sed "s|$HOME|~|" >&2
end end
set -l rm_pkgs (_fisher_ls | _fisher_fmt) set -l rm_pkgs (_fisher_ls | _fisher_fmt)
@ -311,7 +311,7 @@ function _fisher_fetch
command rm -Rf $fisher_config/$pkg command rm -Rf $fisher_config/$pkg
command cp -Rf {$fisher_cache,$fisher_config}/$pkg command cp -Rf {$fisher_cache,$fisher_config}/$pkg
else if test -d \"$fisher_cache/$pkg\" else if test -d \"$fisher_cache/$pkg\"
echo fisher: cannot connect to server -- looking in \"$fisher_cache/$pkg\" | command sed 's|^$HOME|~|' >&2 echo fisher: cannot connect to server -- looking in \"$fisher_cache/$pkg\" | command sed 's|$HOME|~|' >&2
command cp -Rf $fisher_cache/$pkg $fisher_config/$pkg/.. command cp -Rf $fisher_cache/$pkg $fisher_config/$pkg/..
else else
command rm -Rf $fisher_config/$pkg command rm -Rf $fisher_config/$pkg
@ -379,7 +379,7 @@ function _fisher_add -a pkg opts
set target $fisher_path/functions/$target set target $fisher_path/functions/$target
end end
end end
echo "linking $target" | command sed "s|^$HOME|~|" >&2 echo "linking $target" | command sed "s|$HOME|~|" >&2
if set -q opts[1] if set -q opts[1]
command ln -sf $src $target command ln -sf $src $target
else else