Loading cccli/cli.py +2 −4 Original line number Diff line number Diff line Loading @@ -112,10 +112,8 @@ class Cli(object): if len(argv) == 0: continue # alias subsitution if argv[0] in self.aliases: oldargv = argv[1:] argv = shlex.split(self.aliases[argv[0]]) argv.extend(oldargv) argv = self.aliases.substitute(argv) # command execution self._exec_command(argv) except KeyboardInterrupt: self.printer.out("") Loading cccli/commands.py +8 −0 Original line number Diff line number Diff line Loading @@ -7,6 +7,7 @@ CloudControl CLI commands module import re import ConfigParser import os import shlex from cccli.exception import * from cccli.command import * Loading Loading @@ -98,3 +99,10 @@ class Aliases(dict): for n,v in self.items(): fparser.set("alias", n, v) fparser.write(open(filename, "w")) def substitute(self, argv): if argv[0] in self: oldargv = argv[1:] argv = shlex.split(self[argv[0]]) argv.extend(oldargv) return argv Loading
cccli/cli.py +2 −4 Original line number Diff line number Diff line Loading @@ -112,10 +112,8 @@ class Cli(object): if len(argv) == 0: continue # alias subsitution if argv[0] in self.aliases: oldargv = argv[1:] argv = shlex.split(self.aliases[argv[0]]) argv.extend(oldargv) argv = self.aliases.substitute(argv) # command execution self._exec_command(argv) except KeyboardInterrupt: self.printer.out("") Loading
cccli/commands.py +8 −0 Original line number Diff line number Diff line Loading @@ -7,6 +7,7 @@ CloudControl CLI commands module import re import ConfigParser import os import shlex from cccli.exception import * from cccli.command import * Loading Loading @@ -98,3 +99,10 @@ class Aliases(dict): for n,v in self.items(): fparser.set("alias", n, v) fparser.write(open(filename, "w")) def substitute(self, argv): if argv[0] in self: oldargv = argv[1:] argv = shlex.split(self[argv[0]]) argv.extend(oldargv) return argv