update run-shell section with a line about quoting?

13 views
Skip to first unread message

Sivaram Neelakantan

unread,
Sep 12, 2020, 1:20:41 PM9/12/20
to tmux-...@googlegroups.com
It wasn't obvious to me that [shell-command] needs to be quoted if you
want to pass parameters to the shell command.

I kept getting errors for 'ls -al' for some time.

I spent a fair bit of time reading the docs before trying the
"obvious" method. Can this section be modified with the sentence I
added, if there are no side effects?

run-shell [-b] [-d delay] [-t target-pane] [shell-command] (alias:
run) Execute shell-command in the background
without creating a window. Before being executed,
shell-command is expanded using the rules speci-
fied in the FORMATS section. With -b, the command
is run in the background. -d waits for delay
seconds before starting the command. After the
command finishes, any output to stdout is displayed
in view mode (in the pane specified by -t or the
current pane if omitted). If the command doesn't
return success, the exit status is also displayed.
--> Quote the command and parameters in single or
double quotes if it takes parameters.


sivaram
--

Nicholas Marriott

unread,
Sep 12, 2020, 1:33:45 PM9/12/20
to Sivaram Neelakantan, tmux-users
Hi

It only needs to be quoted if it contains spaces or other special characters. It is standard in man pages that unless otherwise stated each item is a single argument and it is the same for all uses of shell-command in tmux.1 and there are several examples. I don't think it needs to be stated, although we could add an example under run-shell as well.



--
You received this message because you are subscribed to the Google Groups "tmux-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tmux-users+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/tmux-users/krpqx3v9gidi8w.fsf%40gmail.com.

Sivaram Neelakantan

unread,
Sep 13, 2020, 5:13:05 AM9/13/20
to tmux-...@googlegroups.com
On Sat, Sep 12 2020,Nicholas Marriott wrote:

> Hi
>
> It only needs to be quoted if it contains spaces or other special
> characters. It is standard in man pages that unless otherwise stated
> each item is a single argument and it is the same for all uses of
> shell-command in tmux.1 and there are several examples. I don't
> think it needs to be stated, although we could add an example under
> run-shell as well.
>

that would help then. if there are examples provided. Thanks

[snipped 27 lines]

sivaram
--

Reply all
Reply to author
Forward
0 new messages