Automatic bash completion
[stgit] / stgit / commands / patches.py
index 656a4a1..54fac21 100644 (file)
@@ -21,9 +21,10 @@ from stgit.argparse import opt
 from stgit.commands.common import *
 from stgit.utils import *
 from stgit.out import *
-from stgit import stack, git
+from stgit import argparse, stack, git
 
 help = 'Show the applied patches modifying a file'
+kind = 'stack'
 usage = ['[options] [<files or dirs>]']
 description = """
 Show the applied patches modifying the given files. Without arguments,
@@ -31,13 +32,14 @@ it shows the patches affected by the local tree modifications. The
 '--diff' option also lists the patch log and the diff for the given
 files."""
 
+args = [argparse.known_files]
 options = [
     opt('-d', '--diff', action = 'store_true',
         short = 'Show the diff for the given files'),
-    opt('-b', '--branch',
+    opt('-b', '--branch', args = [argparse.stg_branches],
         short = 'Use BRANCH instead of the default branch')]
 
-directory = DirectoryHasRepository()
+directory = DirectoryHasRepository(log = False)
 
 diff_tmpl = \
           '-------------------------------------------------------------------------------\n' \