Skip to content

Instantly share code, notes, and snippets.

@nkpart
Last active August 29, 2015 13:56
Show Gist options
  • Save nkpart/9063009 to your computer and use it in GitHub Desktop.
Save nkpart/9063009 to your computer and use it in GitHub Desktop.
Selecta + Tmux
# Creates a new window to run selecta over list-windows, then selects the result.
bind-key g new-window -n "__SELECTA__" "tmux list-windows | grep -v __SELECTA__ | selecta | sed s/:.*// | xargs -I {} tmux select-window -t {}"
# The same in a split (this is probably better). 21 is how high selecta is by default, 1 line for the prompt, 20 for results
bind-key g split-window -l 21 "tmux list-windows | selecta | sed s/:.*// | xargs -I {} tmux select-window -t {}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment