tmux / tmux

tmux source code
Other
35.15k stars 2.12k forks source link

The man page should include, that `save-buffer` and `load-buffer` are able to read from `stdin` #3341

Closed keks24 closed 2 years ago

keks24 commented 2 years ago

Issue description

The man page does not tell the user, that load-buffer and save-buffer are able to read from stdin; only path is mentioned:

$ man 1 tmux
load-buffer [-w] [-b buffer-name] [-t target-client] path
                   (alias: loadb)
             Load the contents of the specified paste buffer from path.  If -w
             is given, the buffer is also sent to the clipboard for
             target-client using the xterm(1) escape sequence, if possible.
[...]
save-buffer [-a] [-b buffer-name] path
                   (alias: saveb)
             Save the contents of the specified paste buffer to path.  The -a
             option appends to rather than overwriting the file.

It should look like this, so it is obvious to choose between path and stdin:

load-buffer [-w] [-b buffer-name] [-t target-client] [path | -]
[...]
             target-client using the xterm(1) escape sequence, if possible.
             If - is given, the contents are read from stdin.
[...]
save-buffer [-a] [-b buffer-name] [path | -]
[...]
             option appends to rather than overwriting the file.
             If - is given, the contents are read from stdin.

I am going to create a pull-request, once I have figured out how to edit the man page file tmux.1 properly.

Required information

$ tmux -V
tmux 3.3a

Not needed.


Side note: The parameter is mentioned in the file CHANGES at the bottom of CHANGES FROM 1.2 TO 1.3, 18 July 2010.

nicm commented 2 years ago

I'll close this if you are going to open a PR instead, thanks.

github-actions[bot] commented 1 year ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.