Skip to content

Instantly share code, notes, and snippets.

@yitsushi
Last active December 18, 2020 02:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save yitsushi/a2a297e07907aa48c15e95dcae479893 to your computer and use it in GitHub Desktop.
Save yitsushi/a2a297e07907aa48c15e95dcae479893 to your computer and use it in GitHub Desktop.
dmenu like tool in tmux

dmenu like tool in tmux

tmux.conf:

bind-key C-d split-window "pmenu"
# for horisontal split use
# bind-key C-d split-window -h "pmenu"`

~/bin/pmenu:

(or anywhere on your $PATH)

#!/usr/bin/env zsh

command=$(echo $PATH | tr ':' ' ' | xargs -n1 ls -1 | sort | uniq | peco | xargs -n 1 which)
exec "$command"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment