Skip to content

Commit

Permalink
Quote arguments when setting PATH (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgebucaran committed Jun 20, 2022
1 parent 944acef commit bf47372
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion functions/replay.fish
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function replay --description "Run Bash commands replaying changes in Fish"
contains -- $name SHLVL PS1 BASH_FUNC || test "$$name" = "$value" && continue

if test "$name" = PATH
string replace --all : " " "set $name $value"
echo set PATH (string split -- : $value | string replace --regex --all -- '(^.*$)' '"$1"')
else if test "$name" = PWD
echo builtin cd "\"$value\""
else
Expand Down

0 comments on commit bf47372

Please sign in to comment.