mirror of
https://github.com/oh-my-fish/oh-my-fish
synced 2024-11-03 15:40:32 +00:00
allowing z plugin to use a custom path
This commit is contained in:
parent
81c57572ac
commit
62928f9aa5
@ -1,3 +1,3 @@
|
||||
function z
|
||||
cd (bash -c 'source /usr/local/etc/profile.d/z.sh; _z $0; echo $PWD' $argv)
|
||||
cd (bash -c 'source $Z_SCRIPT_PATH; _z $0; echo $PWD' $argv)
|
||||
end
|
||||
|
@ -1,5 +1,9 @@
|
||||
if test -z "$Z_SCRIPT_PATH"
|
||||
set -x Z_SCRIPT_PATH /usr/local/etc/profile.d/z.sh
|
||||
end
|
||||
|
||||
function __check_z --on-variable PWD --description 'Setup z on directory change'
|
||||
status --is-command-substitution; and return
|
||||
|
||||
bash -c "source /usr/local/etc/profile.d/z.sh; _z --add `pwd -P`"
|
||||
bash -c "source $Z_SCRIPT_PATH; _z --add `pwd -P`"
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user