From 2558aa6999580ca2d5a5c2188cbc4cb74edf9bee Mon Sep 17 00:00:00 2001 From: Philipp Maier Date: Wed, 10 Mar 2021 16:20:02 +0100 Subject: [PATCH] pySim-shell: add command to show file description All all files (CardFile) have a human readable description but there is no command to display that description yet Change-Id: If716cf3c6b09d53dca652b588671487d5343cf58 Related: OS#4963 --- pySim-shell.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pySim-shell.py b/pySim-shell.py index 5f4624c2..e596d11a 100755 --- a/pySim-shell.py +++ b/pySim-shell.py @@ -81,6 +81,14 @@ class PysimApp(cmd2.Cmd): pin_adm = sanitize_pin_adm(arg) self.card.verify_adm(h2b(pin_adm)) + @cmd2.with_category(CUSTOM_CATEGORY) + def do_desc(self, opts): + """Display human readable file description for the currently selected file""" + desc = self.rs.selected_file.desc + if desc: + self.poutput(desc) + else: + self.poutput("no description available") @with_default_category('ISO7816 Commands')