feat(fish): Add automatically sourcing activate files
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
# vim: filetype=sh
|
||||
|
||||
# OMF plugins: bass, foreign-env, omf, fish-spec, nvm
|
||||
|
||||
# Variables
|
||||
set -g -x fish_greeting ""
|
||||
set -U os (uname)
|
||||
@@ -134,6 +136,7 @@ check_git_status $HOME/.local
|
||||
function cd -w='cd'
|
||||
z $argv || return
|
||||
check_directory_for_new_repository
|
||||
check_and_source_activate
|
||||
end
|
||||
|
||||
function check_directory_for_new_repository
|
||||
@@ -144,3 +147,10 @@ function check_directory_for_new_repository
|
||||
end
|
||||
set -gx last_repository $current_repository
|
||||
end
|
||||
|
||||
function check_and_source_activate
|
||||
if test -f (pwd)/activate.fish
|
||||
echo (set_color green)"Found activate.fish in current directory, sourcing..."(set_color normal)
|
||||
source (pwd)/activate.fish
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user