Linux command line: Support for a space character

Have an idea how to make KryoFlux even better? Let us know...
Post Reply
cas206
Posts: 22
Joined: Sat Jan 22, 2011 4:25 am

Linux command line: Support for a space character

Post by cas206 » Sun Jan 23, 2011 9:21 pm

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

User avatar
Malvineous
Posts: 156
Joined: Sun Oct 31, 2010 10:57 pm
Location: Brisbane, Australia
Contact:

Re: Linux command line: Support for a space character

Post by Malvineous » Fri Feb 04, 2011 2:03 pm

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.

Specfreak
Posts: 17
Joined: Wed Jan 12, 2011 10:18 pm

Re: Linux command line: Support for a space character

Post by Specfreak » Fri Feb 04, 2011 2:07 pm

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.

User avatar
Malvineous
Posts: 156
Joined: Sun Oct 31, 2010 10:57 pm
Location: Brisbane, Australia
Contact:

Re: Linux command line: Support for a space character

Post by Malvineous » Fri Feb 04, 2011 2:14 pm

I think the OP meant he wanted to type "-i 4" instead of "-i4", since most Linux programs accept either variant.

cas206
Posts: 22
Joined: Sat Jan 22, 2011 4:25 am

Re: Linux command line: Support for a space character

Post by cas206 » Fri Feb 04, 2011 7:01 pm

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

User avatar
IFW
Posts: 3079
Joined: Mon Nov 08, 2010 2:42 pm

Re: Linux command line: Support for a space character

Post by IFW » Fri Feb 04, 2011 7:02 pm

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.

Tor
Posts: 28
Joined: Mon May 16, 2011 3:08 pm

Re: Linux command line: Support for a space character

Post by Tor » Tue May 17, 2011 11:48 am

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).
Hostinfo: Debian SID x86_64 and i686

Post Reply