short options for bzr ls

Bug #181124 reported by Martin Pool
6
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Wishlist
Parth Malwankar

Bug Description

Could you add to next version short options to the these. I find it
tedious to type the long ones.

 l = rel(l)ative or (l)ink

Jari

+ -l, --from-root Print paths relative to the root of the branch.
+ -i, --ignored Print ignored files.
+ -k, --kind=ARG List entries of a particular kind: file, directory,
                       symlink.
 -v, --verbose Display more information.
 --versioned Print versioned files.
+ -u, --unknown Print unknown files.
 -h, --help Show help message.
 -q, --quiet Only display errors and warnings.
+ -n, --non-recursive Don't recurse into subdirectories.
+ -b, --show-ids Show internal object ids.
+ -0, --null Write an ascii NUL (\0) separator between files rather
                       than a newline.
 -r ARG, --revision=ARG
                       See "help revisionspec" for details.

Tags: patch trivial ui

Related branches

Revision history for this message
Martin Pool (mbp) wrote : Re: bzr ls and short option support

https://bugs.launchpad.net/bzr/+bug/181124

Should be a simple matter of adding arguments to the Option
constructors in cmd_ls, if anyone wants to try it...

Changed in bzr:
importance: Undecided → Wishlist
status: New → Confirmed
Revision history for this message
Jari Aalto (jari-aalto) wrote : Re: [PATCH] short options for bzr ls

Thanks, here is initial patch.

Jari

 bzrlib/builtins.py | 16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/bzrlib/builtins.py b/bzrlib/builtins.py
index 43db91d..66317a4 100644
--- a/bzrlib/builtins.py
+++ b/bzrlib/builtins.py
@@ -1784,16 +1784,26 @@ class cmd_ls(Command):
             'verbose',
             'revision',
             Option('non-recursive',
+ short_name='n',
                    help='Don\'t recurse into subdirectories.'),
             Option('from-root',
+ short_name='l',
                    help='Print paths relative to the root of the branch.'),
- Option('unknown', help='Print unknown files.'),
- Option('versioned', help='Print versioned files.'),
- Option('ignored', help='Print ignored files.'),
+ Option('unknown',
+ short_name='u',
+ help='Print unknown files.'),
+ Option('versioned',
+ short_name='V',
+ help='Print versioned files.'),
+ Option('ignored',
+ short_name='i',
+ help='Print ignored files.'),
             Option('null',
+ short_name='0',
                    help='Write an ascii NUL (\\0) separator '
                    'between files rather than a newline.'),
             Option('kind',
+ short_name='k',
                    help='List entries of a particular kind: file, directory, symlink.',
                    type=unicode),
             'show-ids',

Revision history for this message
Jari Aalto (jari-aalto) wrote :

Just in case - here is it as an attachment.

Daniel Hahler (blueyed)
tags: added: patch
Parth Malwankar (parthm)
Changed in bzr:
status: Confirmed → In Progress
assignee: nobody → Parth Malwankar (parthm)
Parth Malwankar (parthm)
Changed in bzr:
status: In Progress → Fix Released
milestone: none → 2.2b3
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.