{"thread":{"id":"53375","subject":"[PATCH tig 1/2] Document how to use pipes and redirection with 'bind'","startedAt":"2020-05-02T18:42:09Z","lastAt":"2020-05-02T18:42:14Z","messageCount":2,"participants":["Wolfram Sang"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"396837","messageId":"20200502184152.26550-1-wsa@kernel.org","threadId":"53375","inReplyTo":null,"subject":"[PATCH tig 1/2] Document how to use pipes and redirection with 'bind'","fromName":"Wolfram Sang","fromEmail":"wsa@kernel.org","sentAt":"2020-05-02T18:41:51Z","receivedAt":"2020-05-02T18:42:09Z","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 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":"396838","messageId":"20200502184152.26550-2-wsa@kernel.org","threadId":"53375","inReplyTo":"20200502184152.26550-1-wsa@kernel.org","subject":"[PATCH tig 2/2] Drop unneeded '!' in docs","fromName":"Wolfram Sang","fromEmail":"wsa@kernel.org","sentAt":"2020-05-02T18:41:52Z","receivedAt":"2020-05-02T18:42:14Z","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 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"}]}