* [PATCH RESEND tig 1/2] Document how to use pipes and redirection with 'bind'
@ 2020-05-02 18:48 Wolfram Sang
2020-05-02 18:48 ` [PATCH RESEND tig 2/2] Drop unneeded '!' in docs Wolfram Sang
0 siblings, 1 reply; 3+ messages in thread
From: Wolfram Sang @ 2020-05-02 18:48 UTC (permalink / raw)
To: git; +Cc: Wolfram Sang, Thomas Koutcher, Jonas Fonseca
When my bind command using a pipe did not work, I grepped through the
docs for 'pipe' and 'redirection' with no results. Only after I found
out in the issues tracker that it was intentional, then I noticed the
solution in the examples, too.
Add a paragraph to make it more explicit.
Signed-off-by: Wolfram Sang <wsa@kernel.org>
---
This time with proper CCs. Sorry for the noise!
doc/tigrc.5.adoc | 3 +++
1 file changed, 3 insertions(+)
diff --git a/doc/tigrc.5.adoc b/doc/tigrc.5.adoc
index 630e8f6..1aa8085 100644
--- a/doc/tigrc.5.adoc
+++ b/doc/tigrc.5.adoc
@@ -690,6 +690,9 @@ console output shown (as if '!' was specified). When multiple command options
are specified their behavior are combined, e.g. "?<git commit" will prompt the
user whether to execute the command and will exit Tig after completion.
+Note that if you want to use pipes or redirection in your commands then you
+must run them in a subshell, i.e. embed your commands in `sh -c '<commands>'`.
+
Browsing state variables
^^^^^^^^^^^^^^^^^^^^^^^^
--
2.20.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH RESEND tig 2/2] Drop unneeded '!' in docs
2020-05-02 18:48 [PATCH RESEND tig 1/2] Document how to use pipes and redirection with 'bind' Wolfram Sang
@ 2020-05-02 18:48 ` Wolfram Sang
2020-06-01 1:33 ` Jonas Fonseca
0 siblings, 1 reply; 3+ messages in thread
From: Wolfram Sang @ 2020-05-02 18:48 UTC (permalink / raw)
To: git; +Cc: Wolfram Sang, Thomas Koutcher, Jonas Fonseca
Since commit 99d8d00 ("User-defined commands no longer need to be
prefixed with '!'"), we don't need it anymore. Also, remove a
superfluous comment.
Signed-off-by: Wolfram Sang <wsa@kernel.org>
---
This time with proper CCs. Sorry for the noise!
doc/manual.adoc | 2 +-
doc/tigrc.5.adoc | 3 +--
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/doc/manual.adoc b/doc/manual.adoc
index cf87ba1..0d772ea 100644
--- a/doc/manual.adoc
+++ b/doc/manual.adoc
@@ -208,7 +208,7 @@ Example user-defined commands:
- Copy commit ID to clipboard:
- bind generic 9 !@sh -c "echo -n %(commit) | xclip -selection c"
+ bind generic 9 @sh -c "echo -n %(commit) | xclip -selection c"
- Add/edit notes for the current commit used during a review:
diff --git a/doc/tigrc.5.adoc b/doc/tigrc.5.adoc
index 1aa8085..6b40afe 100644
--- a/doc/tigrc.5.adoc
+++ b/doc/tigrc.5.adoc
@@ -780,8 +780,7 @@ file:
gitk-bg = !"gitk HEAD --not $(git rev-parse --remotes) &"
publish = !"for i in origin public; do git push $i; done"
[tig "bind"]
- # @-prefix means that the console output will not be shown.
- generic = V !@git gitk-bg
+ generic = V @git gitk-bg
generic = > !git publish
--------------------------------------------------------------------------
--
2.20.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH RESEND tig 2/2] Drop unneeded '!' in docs
2020-05-02 18:48 ` [PATCH RESEND tig 2/2] Drop unneeded '!' in docs Wolfram Sang
@ 2020-06-01 1:33 ` Jonas Fonseca
0 siblings, 0 replies; 3+ messages in thread
From: Jonas Fonseca @ 2020-06-01 1:33 UTC (permalink / raw)
To: Wolfram Sang; +Cc: git, Thomas Koutcher
On Sat, May 2, 2020 at 2:48 PM Wolfram Sang <wsa@kernel.org> wrote:
>
> Since commit 99d8d00 ("User-defined commands no longer need to be
> prefixed with '!'"), we don't need it anymore. Also, remove a
> superfluous comment.
Thanks a lot for the two doc improvements!
--
Jonas Fonseca
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-06-01 1:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-02 18:48 [PATCH RESEND tig 1/2] Document how to use pipes and redirection with 'bind' Wolfram Sang
2020-05-02 18:48 ` [PATCH RESEND tig 2/2] Drop unneeded '!' in docs Wolfram Sang
2020-06-01 1:33 ` Jonas Fonseca
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).