mirror of
https://github.com/jorgebucaran/fisher
synced 2024-10-09 09:36:53 +02:00
Change fish_plugins to use ~ instead of $HOME
for better portability (#792)
The fish_plugins file previously used absolute `$HOME` paths, making it non-portable across different machines. This change updates the file to use the ~ character for the home directory, improving compatibility and portability by avoiding hard-coded paths.
This commit is contained in:
parent
2efd33ccd0
commit
63c18183b7
1 changed files with 2 additions and 2 deletions
|
@ -29,7 +29,7 @@ function fisher --argument-names cmd --description "A plugin manager for Fish"
|
|||
set --local old_plugins $_fisher_plugins
|
||||
set --local new_plugins
|
||||
|
||||
test -e $fish_plugins && set --local file_plugins (string match --regex -- '^[^\s]+$' <$fish_plugins)
|
||||
test -e $fish_plugins && set --local file_plugins (string match --regex -- '^[^\s]+$' <$fish_plugins | string replace -- \~ ~)
|
||||
|
||||
if ! set --query argv[2]
|
||||
if test "$cmd" != update
|
||||
|
@ -206,7 +206,7 @@ function fisher --argument-names cmd --description "A plugin manager for Fish"
|
|||
contains -- (string lower -- $plugin) (string lower -- $commit_plugins) || set --append commit_plugins $plugin
|
||||
end
|
||||
|
||||
printf "%s\n" $commit_plugins >$fish_plugins
|
||||
string replace --regex -- $HOME \~ $commit_plugins >$fish_plugins
|
||||
else
|
||||
set --erase _fisher_plugins
|
||||
command rm -f $fish_plugins
|
||||
|
|
Loading…
Reference in a new issue