{"thread":{"id":"8156","subject":"[StGIT PATCH] Fix bash completion after the DAG appliedness patch","startedAt":"2007-05-14T19:44:55Z","lastAt":"2007-05-14T19:44:55Z","messageCount":1,"participants":["Karl Hasselström"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"42163","messageId":"20070514194444.27742.67117.stgit@yoghurt","threadId":"8156","inReplyTo":null,"subject":"[StGIT PATCH] Fix bash completion after the DAG appliedness patch","fromName":"Karl Hasselström","fromEmail":"kha@treskal.com","sentAt":"2007-05-14T19:44:55Z","receivedAt":"2007-05-14T19:44:55Z","isPatch":true,"sender":{"key":"kha@treskal.com","avatar":"https://gravatar.com/avatar/f0120c734b5279b345075a28521e1ac66acb20c9913ffe9bf6ae97e53f7f3f13?d=mp&s=160"},"body":"The bash tab completion used the \"applied\", \"unapplied\" and \"current\"\nfiles to generate completions. Since these don't exist anymore, use\nstg applied/unapplied/series to obtain the same info. It's a bit\nslower, but not terribly much so.\n\nSigned-off-by: Karl Hasselström <kha@treskal.com>\n---\n\n contrib/stgit-completion.bash |   15 ++++-----------\n 1 files changed, 4 insertions(+), 11 deletions(-)\n\ndiff --git a/contrib/stgit-completion.bash b/contrib/stgit-completion.bash\nindex 3c3bf92..2032323 100644\n--- a/contrib/stgit-completion.bash\n+++ b/contrib/stgit-completion.bash\n@@ -70,32 +70,25 @@ _current_branch ()\n # List of all applied patches.\n _applied_patches ()\n {\n-    local g=$(_gitdir)\n-    [ \"$g\" ] && cat \"$g/patches/$(_current_branch)/applied\"\n+    stg applied 2> /dev/null\n }\n \n # List of all unapplied patches.\n _unapplied_patches ()\n {\n-    local g=$(_gitdir)\n-    [ \"$g\" ] && cat \"$g/patches/$(_current_branch)/unapplied\"\n+    stg unapplied 2> /dev/null\n }\n \n # List of all patches.\n _all_patches ()\n {\n-    local b=$(_current_branch)\n-    local g=$(_gitdir)\n-    [ \"$g\" ] && cat \"$g/patches/$b/applied\" \"$g/patches/$b/unapplied\"\n+    stg series --noprefix 2> /dev/null\n }\n \n # List of all patches except the current patch.\n _all_other_patches ()\n {\n-    local b=$(_current_branch)\n-    local g=$(_gitdir)\n-    [ \"$g\" ] && cat \"$g/patches/$b/applied\" \"$g/patches/$b/unapplied\" \\\n-        | grep -v \"^$(cat $g/patches/$b/current 2> /dev/null)$\"\n+    stg series 2> /dev/null | grep -v '^>' | cut -f 2 -d ' '\n }\n \n # List the command options\n"}]}