{"thread":{"id":"53376","subject":"[PATCH RESEND tig 1/2] Document how to use pipes and redirection with 'bind'","startedAt":"2020-05-02T18:48:31Z","lastAt":"2020-06-01T01:34:00Z","messageCount":3,"participants":["Wolfram Sang","Jonas Fonseca"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"396839","messageId":"20200502184825.26707-1-wsa@kernel.org","threadId":"53376","inReplyTo":null,"subject":"[PATCH RESEND tig 1/2] Document how to use pipes and redirection with 'bind'","fromName":"Wolfram Sang","fromEmail":"wsa@kernel.org","sentAt":"2020-05-02T18:48:24Z","receivedAt":"2020-05-02T18:48:31Z","isPatch":true,"sender":{"key":"wsa@kernel.org","avatar":null},"body":"When my bind command using a pipe did not work, I grepped through the\ndocs for 'pipe' and 'redirection' with no results. Only after I found\nout in the issues tracker that it was intentional, then I noticed the\nsolution in the examples, too.\n\nAdd a paragraph to make it more explicit.\n\nSigned-off-by: Wolfram Sang <wsa@kernel.org>\n---\n\nThis time with proper CCs. Sorry for the noise!\n\n doc/tigrc.5.adoc | 3 +++\n 1 file changed, 3 insertions(+)\n\ndiff --git a/doc/tigrc.5.adoc b/doc/tigrc.5.adoc\nindex 630e8f6..1aa8085 100644\n--- a/doc/tigrc.5.adoc\n+++ b/doc/tigrc.5.adoc\n@@ -690,6 +690,9 @@ console output shown (as if '!' was specified). When multiple command options\n are specified their behavior are combined, e.g. \"?<git commit\" will prompt the\n user whether to execute the command and will exit Tig after completion.\n \n+Note that if you want to use pipes or redirection in your commands then you\n+must run them in a subshell, i.e. embed your commands in `sh -c '<commands>'`.\n+\n Browsing state variables\n ^^^^^^^^^^^^^^^^^^^^^^^^\n \n-- \n2.20.1\n\n"},{"id":"396840","messageId":"20200502184825.26707-2-wsa@kernel.org","threadId":"53376","inReplyTo":"20200502184825.26707-1-wsa@kernel.org","subject":"[PATCH RESEND tig 2/2] Drop unneeded '!' in docs","fromName":"Wolfram Sang","fromEmail":"wsa@kernel.org","sentAt":"2020-05-02T18:48:25Z","receivedAt":"2020-05-02T18:48:35Z","isPatch":true,"sender":{"key":"wsa@kernel.org","avatar":null},"body":"Since commit 99d8d00 (\"User-defined commands no longer need to be\nprefixed with '!'\"), we don't need it anymore. Also, remove a\nsuperfluous comment.\n\nSigned-off-by: Wolfram Sang <wsa@kernel.org>\n---\n\nThis time with proper CCs. Sorry for the noise!\n\n doc/manual.adoc  | 2 +-\n doc/tigrc.5.adoc | 3 +--\n 2 files changed, 2 insertions(+), 3 deletions(-)\n\ndiff --git a/doc/manual.adoc b/doc/manual.adoc\nindex cf87ba1..0d772ea 100644\n--- a/doc/manual.adoc\n+++ b/doc/manual.adoc\n@@ -208,7 +208,7 @@ Example user-defined commands:\n \n  - Copy commit ID to clipboard:\n \n-\tbind generic 9 !@sh -c \"echo -n %(commit) | xclip -selection c\"\n+\tbind generic 9 @sh -c \"echo -n %(commit) | xclip -selection c\"\n \n  - Add/edit notes for the current commit used during a review:\n \ndiff --git a/doc/tigrc.5.adoc b/doc/tigrc.5.adoc\nindex 1aa8085..6b40afe 100644\n--- a/doc/tigrc.5.adoc\n+++ b/doc/tigrc.5.adoc\n@@ -780,8 +780,7 @@ file:\n \tgitk-bg = !\"gitk HEAD --not $(git rev-parse --remotes) &\"\n \tpublish = !\"for i in origin public; do git push $i; done\"\n [tig \"bind\"]\n-\t# @-prefix means that the console output will not be shown.\n-\tgeneric = V !@git gitk-bg\n+\tgeneric = V @git gitk-bg\n \tgeneric = > !git publish\n --------------------------------------------------------------------------\n \n-- \n2.20.1\n\n"},{"id":"398966","messageId":"CAFuPQ1+3NY1XRwRV6UK0+8u-uwZ0+m6P3OTUGsWCcSz77+otiQ@mail.gmail.com","threadId":"53376","inReplyTo":"20200502184825.26707-2-wsa@kernel.org","subject":"Re: [PATCH RESEND tig 2/2] Drop unneeded '!' in docs","fromName":"Jonas Fonseca","fromEmail":"jonas.fonseca@gmail.com","sentAt":"2020-06-01T01:33:44Z","receivedAt":"2020-06-01T01:34:00Z","isPatch":true,"sender":{"key":"jonas.fonseca@gmail.com","avatar":"https://gravatar.com/avatar/9b7fa23cce50269e5d164312b6ac5ae818a180f837b38f28f3bdf689dd7f96cd?d=mp&s=160"},"body":"On Sat, May 2, 2020 at 2:48 PM Wolfram Sang <wsa@kernel.org> wrote:\n>\n> Since commit 99d8d00 (\"User-defined commands no longer need to be\n> prefixed with '!'\"), we don't need it anymore. Also, remove a\n> superfluous comment.\n\nThanks a lot for the two doc improvements!\n\n-- \nJonas Fonseca\n"}]}