Advertisement
Guest User

tmux invalid config example

a guest
May 17th, 2019
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.71 KB | None | 0 0
  1. # in response to https://stackoverflow.com/a/40902312/2098939
  2.  
  3. # in the current state, tmux complains about the run-shell command since there is no semicolon after the line with 'j' and effectively this results in "bind-key j run-shell 'echo j' bind-key k run-shell 'echo k'" which is not a valid tmux command
  4. # if the line with 'j' is removed, the config loads, but you'll notice that only i and k are bound, while l and m are not, due to the comment
  5.  
  6. unbind i
  7. unbind j
  8. unbind k
  9. unbind l
  10. unbind m
  11. if-shell -b 'true' \
  12.   "bind-key i run-shell 'echo i'; \
  13.   bind-key j run-shell 'echo j' \
  14.   bind-key k run-shell 'echo k' \
  15.   #foo \
  16.   bind-key l run-shell 'echo l'; \
  17.   bind-key m run-shell 'echo m'; \
  18.   "
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement