mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-22 07:43:31 +01:00
Prefixing tmux wrapper function with '_'.
This commit is contained in:
parent
f0a920df5a
commit
a91872df35
@ -49,7 +49,7 @@ if which tmux &> /dev/null
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Wrapper function for tmux.
|
# Wrapper function for tmux.
|
||||||
function zsh_tmux_plugin_run()
|
function _zsh_tmux_plugin_run()
|
||||||
{
|
{
|
||||||
# We have other arguments, just run them
|
# We have other arguments, just run them
|
||||||
if [[ -n "$@" ]]
|
if [[ -n "$@" ]]
|
||||||
@ -68,10 +68,10 @@ if which tmux &> /dev/null
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Use the completions for tmux for our function
|
# Use the completions for tmux for our function
|
||||||
compdef _tmux zsh_tmux_plugin_run
|
compdef _tmux _zsh_tmux_plugin_run
|
||||||
|
|
||||||
# Alias tmux to our wrapper function.
|
# Alias tmux to our wrapper function.
|
||||||
alias tmux=zsh_tmux_plugin_run
|
alias tmux=_zsh_tmux_plugin_run
|
||||||
|
|
||||||
# Autostart if not already in tmux and enabled.
|
# Autostart if not already in tmux and enabled.
|
||||||
if [[ ! -n "$TMUX" && "$ZSH_TMUX_AUTOSTART" == "true" ]]
|
if [[ ! -n "$TMUX" && "$ZSH_TMUX_AUTOSTART" == "true" ]]
|
||||||
@ -80,7 +80,7 @@ if which tmux &> /dev/null
|
|||||||
if [[ "$ZSH_TMUX_AUTOSTART_ONCE" == "false" || "$ZSH_TMUX_AUTOSTARTED" != "true" ]]
|
if [[ "$ZSH_TMUX_AUTOSTART_ONCE" == "false" || "$ZSH_TMUX_AUTOSTARTED" != "true" ]]
|
||||||
then
|
then
|
||||||
export ZSH_TMUX_AUTOSTARTED=true
|
export ZSH_TMUX_AUTOSTARTED=true
|
||||||
zsh_tmux_plugin_run
|
_zsh_tmux_plugin_run
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user