-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
command line option -a doesn't match vspipe's behavior #18
Comments
What is available now is a feature contributed by @wallace11, who considered vspipe's approach syntactically ugly. As for me, I don't have strong preference for any of them, and I don't see why VSP can't provide both. One more point I'd like to make is that vspipe-style arguments should use a key different to |
Well, if I want to provide multiple complicated filenames to a script from
the command line, then it's easier with vspipe's -a than vsp's -a.
vspipe's solution might be ugly, but it's more usable for this case:
Shells generally provide nice filename completion features for `-a
fn1=/path/to/file1`, but you can't use the file completion feature at all
once you start a quote with a filenames in the front.
If we want to keep the current feature, at least we should make it
repeatable so that each -a provides a new argument to the script and not
reparse the string vis `shlex.split`.
compare:
run.py input.vpy -a "fileame1 filename2" # won't be able to
auto-complete filename2
run.py input.vpy -a "filename1" -a "filename2"
(Perhaps people don't see this issue because most just read sources from
the current directory, so oftentimes the filename is very simple, like
00002.m2ts as most source filters insist on creating the index file in the
same directory. But I have modified my source filters to not clobber the
source directory at all, so I tend to use very long and complicated
filenames for the source files in their original places. The current -a
design makes it especially hard for me to specify the names via
auto-completion.)
If we just introduce another flag modeled after vspipe's -a, do you have
suggestions for the single character name and long names?
Thanks.
|
|
The current behavior of -a (passing command line to the script via
sys.argv
is incompatible with that of vspipe, which makes portable scripts impossible.Another drawback is that sometimes you will have to double escape the arguments (i.e. when passing a value including a
\
). I think vspipe's -a is much nicer, and we don't need to bother with usingshlex.split
to reparse the command line.I have a rough patch ready, but, before sending it in, I'd like to gather some opinions on this issue as it's an incompatible change.
The text was updated successfully, but these errors were encountered: