Page 1 of 1

Linux command line: Support for a space character

Posted: Sun Jan 23, 2011 9:21 pm
by cas206
I'm finally getting in the habit of NOT putting a space between the option letter and the argument. However, allowing a space (or not) would be a bit more user friendly.

Regards,
Chris

Re: Linux command line: Support for a space character

Posted: Fri Feb 04, 2011 2:03 pm
by Malvineous
Just for the record this isn't specific to the Linux version, it's just the way the command line handling has been written. It has been ported to Linux unchanged. Maybe you're rather use the GUI instead? It works fine under Linux too.

Re: Linux command line: Support for a space character

Posted: Fri Feb 04, 2011 2:07 pm
by Specfreak
You probably need to encompass the "file name" in ""s. This is what I do with SamDisk to get longer filenames with Spaces.
Hopefully the same may work for the DTC.

Re: Linux command line: Support for a space character

Posted: Fri Feb 04, 2011 2:14 pm
by Malvineous
I think the OP meant he wanted to type "-i 4" instead of "-i4", since most Linux programs accept either variant.

Re: Linux command line: Support for a space character

Posted: Fri Feb 04, 2011 7:01 pm
by cas206
Malvineous wrote:Just for the record this isn't specific to the Linux version, it's just the way the command line handling has been written. It has been ported to Linux unchanged. Maybe you're rather use the GUI instead? It works fine under Linux too.
GUI ?! Blech! I prefer to stay clean. :lol: Just kidding. I realize GUI's are sometimes necessary and are an important tool to have in the tool kit. However, I usually work from the command line if available. I've already written scripts to do common tasks. (i.e. single sided TI-99 disks, double sided where I have to reverse the order of tracks on side 2, etc). I realize it's a nitpick but if we are wishing for features....

Regards,
Chris

Re: Linux command line: Support for a space character

Posted: Fri Feb 04, 2011 7:02 pm
by IFW
DTC can report exactly where and what its problem is with any of its arguments.
If you add support for reading the same parameter from two separate, adjacent parameters, the command line has to be processed in a fairly different way.
ie do it how it is now, and if there is no argument to be found, treat the next argument as an extension of the current one, unless it is another argument in which case the previous argument in progress should be remembered, and reported as failing.
I see very little value in this to be honest, but noted it is a request.

Re: Linux command line: Support for a space character

Posted: Tue May 17, 2011 11:48 am
by Tor
Well, standard getopt(3), which is how command line parameters are usually read on *nix (including Linux or BSD) will handle '-a 1', '-a1' equally well, and lots of other combinations (e.g. '-d -e -f' or '-def' or '-d -ef' etc., and it'll know if a flag takes an argument or not so it doesn't get confused by -ef v.s -e -f).