comparison frontends/src/jp/arg_tools.py @ 2354:5129a0506739

jp (shell): fixed use of profile + added EOF handling: - main profile (i.e. the one specified on command line when invocating "jp shell") was not used. It is now added to arguments if the value is not overriden on command line or in use - EOF (i.e. when user press C-d) is now understood as "quit" command
author Goffi <goffi@goffi.org>
date Fri, 08 Sep 2017 07:58:10 +0200
parents f4e05600577b
children 8b37a62336c3
comparison
equal deleted inserted replaced
2353:ebc0dfe9c0ca 2354:5129a0506739
87 host.disp(_(u'ignoring {name}={value}, not corresponding to any argument (in USE)').format( 87 host.disp(_(u'ignoring {name}={value}, not corresponding to any argument (in USE)').format(
88 name=arg, 88 name=arg,
89 value=escape(value))) 89 value=escape(value)))
90 else: 90 else:
91 if verbose: 91 if verbose:
92 host.disp(_(u'arg {name}={value} set (in USE)').format(name=arg, value=escape(value))) 92 host.disp(_(u'arg {name}={value} (in USE)').format(name=arg, value=escape(value)))
93 if not action.option_strings: 93 if not action.option_strings:
94 pos_args.append(value) 94 pos_args.append(value)
95 else: 95 else:
96 opt_args.append(action.option_strings[0]) 96 opt_args.append(action.option_strings[0])
97 opt_args.append(value) 97 opt_args.append(value)