This commit is contained in:
Bruno Pinto 2012-10-17 02:42:18 -03:00
parent 644c85adaf
commit 129e13dbc1
2 changed files with 18 additions and 0 deletions

15
plugins/z/cd.fish Normal file
View 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
View File

@ -0,0 +1,3 @@
function z
cd (bash -c 'source /usr/local/etc/profile.d/z.sh; _z $0; echo $PWD' $argv)
end