chiark / gitweb /
Allow StGIT commands to run correctly in subdirectories
[stgit] / contrib / stgit-completion.bash
index 2d0d5f23224cbbd8b4e242ba890426839b22a7d2..b1d2730b65cea767cd53f886f96d342108026d06 100644 (file)
@@ -21,6 +21,7 @@ _stg_commands="
     clone
     commit
     cp
+    edit
     export
     files
     float
@@ -108,7 +109,7 @@ _all_other_patches ()
 _all_branches ()
 {
     local g=$(_gitdir)
-    [ "$g" ] && (cd .git/patches/ && echo *)
+    [ "$g" ] && (cd $g/patches/ && echo *)
 }
 
 _conflicting_files ()
@@ -247,6 +248,7 @@ _stg ()
         unhide) _stg_patches $command _hidden_patches ;;
         # patch commands
         delete) _stg_patches $command _all_patches ;;
+        edit)   _stg_patches $command _applied_patches ;;
         export) _stg_patches $command _applied_patches ;;
         files)  _stg_patches $command _all_patches ;;
         log)    _stg_patches $command _all_patches ;;