Commit f8e09ca6 authored by Hernawan Faïz Abdillah's avatar Hernawan Faïz Abdillah Committed by GitHub

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).
parent 0a325844
function omf.index.path -d 'Get the path to the local package index'
set -q XDG_CACHE_HOME
and echo "$XDG_CACHE_HOME/omf"
or echo "$HOME/.cache/omf"
and echo (echo $XDG_CACHE_HOME | sed 's:/*$::')"/omf"
or echo (echo $HOME | sed 's:/*$::')"/.cache/omf"
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment