mirror of
https://github.com/oh-my-fish/oh-my-fish.git
synced 2025-02-07 02:43:17 +08:00
Fix cutting of paths with equals signs
Cut splits by equals sign and takes the second field. This ignores path contents after a second equals sign. Currently this prevents the installation on NixOS as the nix store path automatically contains a "=". This PR instead selects all but the first field and equals sign, leaving the passed paths as intended.
This commit is contained in:
parent
252566fd68
commit
55da5f7b6f
|
@ -54,13 +54,13 @@ Options:
|
||||||
set -g OMF_CHANNEL dev
|
set -g OMF_CHANNEL dev
|
||||||
|
|
||||||
case '--channel=*'
|
case '--channel=*'
|
||||||
abort "Unknown release channel \""(echo "$argv[1]" | command cut -d= -f2)"\"."
|
abort "Unknown release channel \""(echo "$argv[1]" | command cut -d= -f2-)"\"."
|
||||||
|
|
||||||
case --check
|
case --check
|
||||||
set -g CHECK_ONLY
|
set -g CHECK_ONLY
|
||||||
|
|
||||||
case '--config=*'
|
case '--config=*'
|
||||||
echo "$argv[1]" | command cut -d= -f2 | command sed -e "s#~#$HOME#" | read -g OMF_CONFIG
|
echo "$argv[1]" | command cut -d= -f2- | command sed -e "s#~#$HOME#" | read -g OMF_CONFIG
|
||||||
|
|
||||||
case --noninteractive
|
case --noninteractive
|
||||||
set -g NONINTERACTIVE
|
set -g NONINTERACTIVE
|
||||||
|
@ -70,10 +70,10 @@ Options:
|
||||||
|
|
||||||
case '--offline=*'
|
case '--offline=*'
|
||||||
set -g OFFLINE
|
set -g OFFLINE
|
||||||
echo "$argv[1]" | command cut -d= -f2 | command sed -e "s#~#$HOME#" | read -g OFFLINE_PATH
|
echo "$argv[1]" | command cut -d= -f2- | command sed -e "s#~#$HOME#" | read -g OFFLINE_PATH
|
||||||
|
|
||||||
case '--path=*'
|
case '--path=*'
|
||||||
echo "$argv[1]" | command cut -d= -f2 | command sed -e "s#~#$HOME#" | read -g OMF_PATH
|
echo "$argv[1]" | command cut -d= -f2- | command sed -e "s#~#$HOME#" | read -g OMF_PATH
|
||||||
|
|
||||||
case --uninstall
|
case --uninstall
|
||||||
set -g UNINSTALL
|
set -g UNINSTALL
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
c55853fcc09956fbea8f006a5b86705c71b879348a9240d8f014d0c81233ccf2 install
|
429a76e5b5e692c921aa03456a41258b614374426f959535167222a28b676201 install
|
||||||
|
|
Loading…
Reference in New Issue
Block a user