aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhploetz <hploetz@f711b948-2313-0410-aaa9-d29f33439f0b>2006-05-25 13:36:25 +0000
committerhploetz <hploetz@f711b948-2313-0410-aaa9-d29f33439f0b>2006-05-25 13:36:25 +0000
commitefcd0f0cfd9ef92711d8d74ebe1f4e451dfd931d (patch)
treedd33200960e591d30527199771f7f07b402a45a3
parentb1f2a56881a1892b17bdd0fa53caba832c2d64ff (diff)
sorting
git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@76 f711b948-2313-0410-aaa9-d29f33439f0b
-rw-r--r--cards/tcos_card.py4
-rw-r--r--shell.py1
2 files changed, 4 insertions, 1 deletions
diff --git a/cards/tcos_card.py b/cards/tcos_card.py
index 0145e82..7b6497b 100644
--- a/cards/tcos_card.py
+++ b/cards/tcos_card.py
@@ -50,7 +50,7 @@ class TCOS_Card(ISO_7816_4_Card):
return None
_find_recursive = staticmethod(_find_recursive)
- _ls_l_template = "%(name)10s\t%(type)s\t%(size)4s"
+ _ls_l_template = "%(name)-12s\t%(type)3s\t%(size)4s"
def cmd_list(self, *options):
"""List all EFs and DFs in current DF. Call with -l for verbose information (caution: deselects current file)"""
dirs = self.list_x(1)
@@ -69,6 +69,8 @@ class TCOS_Card(ISO_7816_4_Card):
if "-l" in options:
print self._ls_l_template % {"name": "Name", "type": "Type", "size": "Size"}
+ dirs.sort()
+ files.sort()
for FID in dirs:
name = "[" + utils.hexdump(FID, short=True) + "]"
type = "DF"
diff --git a/shell.py b/shell.py
index b72408f..482c189 100644
--- a/shell.py
+++ b/shell.py
@@ -341,6 +341,7 @@ class Shell:
"Print help, either for all commands or for a specific one."
if command is None:
command_list = self.get_command_mapping().keys()
+ command_list.sort()
for command in command_list:
print self.SHORT_HELP_FORMATSTRING % self.help(command)
else: