feat(fish): Add automatically sourcing activate files
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
# vim: filetype=sh
|
# vim: filetype=sh
|
||||||
|
|
||||||
|
# OMF plugins: bass, foreign-env, omf, fish-spec, nvm
|
||||||
|
|
||||||
# Variables
|
# Variables
|
||||||
set -g -x fish_greeting ""
|
set -g -x fish_greeting ""
|
||||||
set -U os (uname)
|
set -U os (uname)
|
||||||
@@ -134,6 +136,7 @@ check_git_status $HOME/.local
|
|||||||
function cd -w='cd'
|
function cd -w='cd'
|
||||||
z $argv || return
|
z $argv || return
|
||||||
check_directory_for_new_repository
|
check_directory_for_new_repository
|
||||||
|
check_and_source_activate
|
||||||
end
|
end
|
||||||
|
|
||||||
function check_directory_for_new_repository
|
function check_directory_for_new_repository
|
||||||
@@ -144,3 +147,10 @@ function check_directory_for_new_repository
|
|||||||
end
|
end
|
||||||
set -gx last_repository $current_repository
|
set -gx last_repository $current_repository
|
||||||
end
|
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