]> arthur.barton.de Git - bup.git/blobdiff - cmd/ls-cmd.py
options: remove unused 'exe' parameter
[bup.git] / cmd / ls-cmd.py
index 57f4275cf84a28cf0ebb1270de62f0d77d7f02ea..44359a3ec2ba275c00240deb805b55dfa49cd37e 100755 (executable)
@@ -19,8 +19,9 @@ optspec = """
 bup ls <dirs...>
 --
 s,hash   show hash for each file
+a,all    show hidden files
 """
-o = options.Options('bup ls', optspec)
+o = options.Options(optspec)
 (opt, flags, extra) = o.parse(sys.argv[1:])
 
 git.check_repo_or_die()
@@ -35,9 +36,11 @@ for d in extra:
         n = top.lresolve(d)
         if stat.S_ISDIR(n.mode):
             for sub in n:
-                print_node(sub.name, sub)
+                if opt.all or not sub.name.startswith('.'):
+                    print_node(sub.name, sub)
         else:
-            print_node(d, n)
+            if opt.all or not sub.name.startswith('.'):
+                print_node(d, n)
     except vfs.NodeError, e:
         log('error: %s\n' % e)
         ret = 1