mirror of
https://github.com/oh-my-fish/oh-my-fish
synced 2024-11-03 15:40:32 +00:00
initial support for z: "https://github.com/rupa/z"
This commit is contained in:
parent
644c85adaf
commit
129e13dbc1
15
plugins/z/cd.fish
Normal file
15
plugins/z/cd.fish
Normal file
@ -0,0 +1,15 @@
|
||||
#
|
||||
# Source a .rvmrc file in a directory after changing to it, if it exists.
|
||||
# To disable this feature, set rvm_project_rvmrc=0 in $HOME/.rvmrc
|
||||
#
|
||||
function cd --description "Change directory"
|
||||
redefine_function 'cd' "$__fish_datadir/functions/cd.fish" '
|
||||
function cd --description "Change working directory"
|
||||
old_cd "$argv"
|
||||
|
||||
bash -c "source /usr/local/etc/profile.d/z.sh; _z --add `pwd -P`"
|
||||
end
|
||||
'
|
||||
|
||||
cd "$argv"
|
||||
end
|
3
plugins/z/z.fish
Normal file
3
plugins/z/z.fish
Normal file
@ -0,0 +1,3 @@
|
||||
function z
|
||||
cd (bash -c 'source /usr/local/etc/profile.d/z.sh; _z $0; echo $PWD' $argv)
|
||||
end
|
Loading…
Reference in New Issue
Block a user