From 1adb1ce947dc16f2bb6676bf8e3b9d48a52ca61e Mon Sep 17 00:00:00 2001 From: Phyks Date: Fri, 2 May 2014 22:08:24 +0200 Subject: [PATCH] Open multiple files --- main.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/main.py b/main.py index e65edbe..7a2abdd 100755 --- a/main.py +++ b/main.py @@ -304,10 +304,11 @@ if __name__ == '__main__': elif sys.argv[1] == 'open': if len(sys.argv) < 3: sys.exit("Usage: " + sys.argv[0] + - " open ID") - if not openFile(sys.argv[2]): - sys.exit("Unable to open file associated " + - "to ident "+sys.argv[2]) + " open ID1 ID2 …") + for filename in sys.argv[2:]: + if not openFile(filename): + sys.exit("Unable to open file associated " + + "to ident "+filename) elif sys.argv[1] == 'resync': if len(sys.argv) > 2 and sys.argv[2] == 'help':