Skip to content

Commit

Permalink
allow launching arbitrary shell commands from an alias - close #3
Browse files Browse the repository at this point in the history
  • Loading branch information
holtrop committed Apr 16, 2012
1 parent c604c82 commit bc02a33
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions jsvn
Original file line number Diff line number Diff line change
Expand Up @@ -1022,8 +1022,15 @@ def main(argv):
config = get_config()
realsvn = config['svn'] if config['svn'] != '' else findInPath('svn')
out = sys.stdout
orig_subcommand = argv[0] if len(argv) > 0 else ''
if len(argv) > 0:
argv = apply_aliases(config, argv)
if len(argv) > 0 and argv[0].startswith('!'):
# execute an external program
argv[0] = argv[0][1:] # strip leading '!'
argv = [argv[0], orig_subcommand] + argv[1:]
Popen(argv, shell=True).wait()
return 0
using_pager = False
using_color = sys.stdout.isatty() and config['use_color']
if sys.stdout.isatty() and config['use_pager']:
Expand Down

0 comments on commit bc02a33

Please sign in to comment.