mirror of
https://github.com/jimeh/tmuxifier.git
synced 2026-02-19 09:56:39 +00:00
Initialization under fish
This commit is contained in:
17
init.fish
Normal file
17
init.fish
Normal file
@@ -0,0 +1,17 @@
|
||||
# Set/fix Tmuxifier root path if needed.
|
||||
if test -z $TMUXIFIER
|
||||
set -gx TMUXIFIER "$HOME/.tmuxifier"
|
||||
end
|
||||
|
||||
# Add `bin` directroy to `$PATH`.
|
||||
if not contains "$TMUXIFIER/bin" $PATH
|
||||
set -gx PATH "$TMUXIFIER/bin" $PATH
|
||||
end
|
||||
|
||||
# If `tmuxifier` is available, and `$TMUXIFIER_NO_COMPLETE` is not set, then
|
||||
# load Tmuxifier shell completion.
|
||||
if test -n (which tmuxifier); and test -z $TMUXIFIER_NO_COMPLETE
|
||||
source "$TMUXIFIER/completion/tmuxifier.fish"
|
||||
end
|
||||
|
||||
|
||||
@@ -29,6 +29,9 @@ case "$shell" in
|
||||
tcsh )
|
||||
profile='~/.tcshrc'
|
||||
;;
|
||||
fish )
|
||||
profile='~/.config/fish/config.fish'
|
||||
;;
|
||||
* )
|
||||
profile='shell init file'
|
||||
;;
|
||||
@@ -44,6 +47,10 @@ Load Tmuxifier by adding the following to your ${profile}:
|
||||
case "$shell" in
|
||||
csh | tcsh )
|
||||
echo " eval \`tmuxifier init -\`
|
||||
"
|
||||
;;
|
||||
fish )
|
||||
echo " eval (tmuxifier init -)
|
||||
"
|
||||
;;
|
||||
* )
|
||||
@@ -67,6 +74,10 @@ case "$shell" in
|
||||
echo "setenv TMUXIFIER \"$TMUXIFIER\";"
|
||||
echo "source \"\$TMUXIFIER/init.tcsh\";"
|
||||
;;
|
||||
fish )
|
||||
echo "set -gx TMUXIFIER \"$TMUXIFIER\";"
|
||||
echo "source \"\$TMUXIFIER/init.fish\";"
|
||||
;;
|
||||
* )
|
||||
echo "export TMUXIFIER=\"$TMUXIFIER\";"
|
||||
echo "source \"\$TMUXIFIER/init.sh\";"
|
||||
|
||||
Reference in New Issue
Block a user