mirror of
https://github.com/oh-my-fish/oh-my-fish.git
synced 2025-02-12 05:18:30 +08:00
Fix double slash in index path (#775)
* Fix double slash in index path Double slash might disturb comparison and make them false positive. * Fix compatibility with older fish shell Suggested by @faho [here](https://github.com/oh-my-fish/oh-my-fish/pull/775#issuecomment-736224485).
This commit is contained in:
parent
0a32584476
commit
f8e09ca604
|
@ -1,5 +1,5 @@
|
||||||
function omf.index.path -d 'Get the path to the local package index'
|
function omf.index.path -d 'Get the path to the local package index'
|
||||||
set -q XDG_CACHE_HOME
|
set -q XDG_CACHE_HOME
|
||||||
and echo "$XDG_CACHE_HOME/omf"
|
and echo (echo $XDG_CACHE_HOME | sed 's:/*$::')"/omf"
|
||||||
or echo "$HOME/.cache/omf"
|
or echo (echo $HOME | sed 's:/*$::')"/.cache/omf"
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user