diff options
author | Tiago Cunha <tcunha@gmx.com> | 2009-02-01 18:14:49 +0000 |
---|---|---|
committer | Tiago Cunha <tcunha@gmx.com> | 2009-02-01 18:14:49 +0000 |
commit | 804beb9266f9f731329d90b56842a863598f25ff (patch) | |
tree | f6e5ecc9c255ff0b80c2df09093a2731933e07c5 /FAQ | |
parent | 051dcdcba803211e05f7a8a53b44aac3af5a0056 (diff) | |
download | rtmux-804beb9266f9f731329d90b56842a863598f25ff.tar.gz rtmux-804beb9266f9f731329d90b56842a863598f25ff.tar.bz2 rtmux-804beb9266f9f731329d90b56842a863598f25ff.zip |
Support commands with right parenthesis. From nicm and me.
Diffstat (limited to 'FAQ')
-rw-r--r-- | FAQ | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -164,3 +164,18 @@ exit (elinks, for some strange reason, sets it to the value of TERM): STY= `which elinks` $* echo -ne \\033]0\;\\007; } + +* What's the proper way to escape characters with #(command)? + +When using the character pair #(command), the command will be parsed twice. +First when it's read by the configuration file, or the command-prompt parser, +and another right before the command is passed to the shell by popen(3). As an +example, to echo the string (test) to the status line, one could use single, +or double-quotes (the meaning is the same as if in the shell): + + set -g status-right "#(echo \\\\(test\\\\))" + set -g status-right '#(echo \\\(test\\\))' + +With the double-quotes, the string when is first parsed will be set to +#(echo \\(test\\)), and then again parsed as echo \(test\) before passing the +command to sh -c. |