mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-31 12:21:19 -03:00
Use set -l to force use of a local variable
Bare set overwrites a global/universal variable if it exists.
This commit is contained in:
@@ -13,7 +13,7 @@ function prompt_pwd --description "Print the current working directory, shortene
|
||||
or set -l fish_prompt_pwd_dir_length 1
|
||||
|
||||
# Replace $HOME with "~"
|
||||
set realhome ~
|
||||
set -l realhome ~
|
||||
set -l tmp (string replace -r '^'"$realhome"'($|/)' '~$1' $PWD)
|
||||
|
||||
if [ $fish_prompt_pwd_dir_length -eq 0 ]
|
||||
|
||||
Reference in New Issue
Block a user