Commit 2ece28d1 authored by Vincent Pelletier's avatar Vincent Pelletier

Allow argument file to be separated for "@" prefix.

Allows shell expansion (ex: "@~/foo.cfg" cannot be expanded, "@ ~/foo.cfg"
can be).
parent 82b6d722
...@@ -842,9 +842,12 @@ class ShlexArgumentParser(argparse.ArgumentParser): ...@@ -842,9 +842,12 @@ class ShlexArgumentParser(argparse.ArgumentParser):
new_args = [] new_args = []
append = new_args.append append = new_args.append
extend = new_args.extend extend = new_args.extend
args = iter(args)
for arg in args: for arg in args:
if arg[:1] in self.fromfile_prefix_chars: if arg[:1] in self.fromfile_prefix_chars:
filepath = arg[1:] filepath = arg[1:]
if not filepath:
fileath = next(args)
new_cwd = os.path.normpath(os.path.join( new_cwd = os.path.normpath(os.path.join(
cwd, cwd,
os.path.dirname(filepath), os.path.dirname(filepath),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment