diff options
author | Adam <adis@blad.is> | 2012-06-05 13:44:59 +0200 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2012-06-05 20:40:51 -0700 |
commit | 0ce6829e4c430a2e8e4e2d3d486a8b0528039f0e (patch) | |
tree | 41a526830c8e69904abb4d55cdac58c7ceea11ef /make_completions.py | |
parent | 4e3acdcbdc86cc8d63a3646d6ba93e91bfaac75d (diff) |
Python3 fixes in make_completions.py
Diffstat (limited to 'make_completions.py')
-rwxr-xr-x | make_completions.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/make_completions.py b/make_completions.py index d64409f9..3c74aa31 100755 --- a/make_completions.py +++ b/make_completions.py @@ -43,7 +43,7 @@ def print_completion( cmd, switch_arr, arg, desc ): if len(switch_arr)==0: return - res = "complete -c %s" % (cmd) + res = "complete -c {0}".format(cmd) for sw in switch_arr: offset=1 @@ -56,9 +56,9 @@ def print_completion( cmd, switch_arr, arg, desc ): switch_type = "l" offset=2 - res += " -%s %s" % (switch_type, escape(sw[offset:])) + res += " -{0} {1}".format(switch_type, escape(sw[offset:])) - res += " --description '%s'" % (up_first(escape_quotes(clean(desc)))) + res += " --description '{0}'".format(up_first(escape_quotes(clean(desc)))) print(res) @@ -67,9 +67,9 @@ cmd = sys.argv[1] header(cmd) try: - man = commands.getoutput( "man %s | col -b".format(cmd)) + man = commands.getoutput( "man {0} | col -b".format(cmd)) except NameError: - man = subprocess.getoutput( "man %s | col -b".format(cmd)) + man = subprocess.getoutput( "man {0} | col -b".format(cmd)) remainder = man |