Created
January 24, 2013 01:18
-
-
Save mcfiredrill/4616668 to your computer and use it in GitHub Desktop.
simple tmux bash completion
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# completion for tmux session names | |
function _tmux_complete_session() { | |
local cur | |
cur="${COMP_WORDS[COMP_CWORD]}" | |
COMPREPLY=( $(compgen -W "$(tmux ls | cut -f 1 -d ':')" -- "${cur}") ) | |
} | |
alias td='tmux a -d -t' | |
complete -F _tmux_complete_session td |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment