Skip to content

Instantly share code, notes, and snippets.

@uasi
Created November 16, 2011 17:20
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save uasi/1370716 to your computer and use it in GitHub Desktop.
Save uasi/1370716 to your computer and use it in GitHub Desktop.
Embedding shell script in .tmux.conf
# cat <<__DATA__ >/dev/null
# Your tmux configuration here
set-option -g prefix C-t
unbind-key C-b
bind-key C-t send-prefix
# Call foo
run "cut -c3- ~/.tmux.conf | sh -s foo"
# Call bar
run "cut -c3- ~/.tmux.conf | sh -s bar"
# __DATA__
#
# function foo {
# # Do foo
# }
#
# function bar {
# # Do bar
# }
#
# $1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment