Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
a91872df
Commit
a91872df
authored
Mar 26, 2013
by
Josh Matthews
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prefixing tmux wrapper function with '_'.
parent
f0a920df
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
tmux.plugin.zsh
plugins/tmux/tmux.plugin.zsh
+4
-4
No files found.
plugins/tmux/tmux.plugin.zsh
View file @
a91872df
...
@@ -49,7 +49,7 @@ if which tmux &> /dev/null
...
@@ -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
...
@@ -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
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment