From 105ec527b59e1991d9bd07fb72e173f48a56141f Mon Sep 17 00:00:00 2001 From: Florent Date: Tue, 17 Dec 2013 15:20:49 +0100 Subject: [PATCH] Sort results of ls by default and replace option -s by option -U (same than the real ls command) refs #1079 --- weboob/applications/boobank/boobank.py | 4 ++-- weboob/tools/application/repl.py | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/weboob/applications/boobank/boobank.py b/weboob/applications/boobank/boobank.py index 900809db..d3691fc9 100644 --- a/weboob/applications/boobank/boobank.py +++ b/weboob/applications/boobank/boobank.py @@ -241,10 +241,10 @@ class Boobank(ReplApplication): def do_list(self, line): """ - list [-s] + list [-U] List accounts. - Use -s option to display accounts in alphabetical order. + Use -U to disable sorting of results. """ return self.do_ls(line) diff --git a/weboob/tools/application/repl.py b/weboob/tools/application/repl.py index 379682b2..b3609da7 100644 --- a/weboob/tools/application/repl.py +++ b/weboob/tools/application/repl.py @@ -954,20 +954,20 @@ class ReplApplication(Cmd, ConsoleApplication): def do_ls(self, line): """ - ls [-d] [-s] [PATH] + ls [-d] [-U] [PATH] List objects in current path. If an argument is given, list the specified path. - Use -s option to sort deterministic sort of results. + Use -U option to not sort results. """ # TODO: real parsing of options path = line.strip() only = False - sort = False + sort = True - if '-s' in line.strip().partition(' '): + if '-U' in line.strip().partition(' '): path = line.strip().partition(' ')[-1] - sort = True + sort = False if '-d' in line.strip().partition(' '): path = None