[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Which is the best and why

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 28
Thread images: 3

File: -arg vs --arg vs ∕arg.png (9KB, 640x74px) Image search: [Google]
-arg vs --arg vs ∕arg.png
9KB, 640x74px
>>
>>59923102
Definitely not the last.
>>
>>59923102
First one is an abbreviation of the second. Third is trash.
>>
GNU style is the only one that makes sense.

--afunctionality
--bfunctionality
--cfunctionality
or
-a
-b
-c

with the possibility to do
-abc
>>
GUI
>>
>>59923277
I wish more software did this rather than some half ass abomination.
>>
>>59923102
-arg
Please and thank you, short, sweet, and simple.
>>
>>59923277
Master race
>>
>arg
>white
>>
>>59923277
/thread
>>
>>59923277
This
>>
>>59923277
this. -a or --arg
>>
>>59923277
This tbqh.
>>
File: IMG-20170321-WA0000.jpg (39KB, 500x651px) Image search: [Google]
IMG-20170321-WA0000.jpg
39KB, 500x651px
>>59923277
This, 100%
>>
>>59923277
Is there any reason why we have both - and --? It seems - would be simpler and shorter.
>>
>>59923918
Do you mean --thread ??? ^^
>>
- for single-letter bool flags
-- for arguments which should be a short word followed by a value
>>
>>59924285
legibility
say you want to write a shell script using tools you almost never use.
It's easier to read said script few years in the future without having to refer to the manpage
>>
>>59923102
Only
ARG=VALUE ./a.out

is patrician
>>
>>59924308
I'll admit, I both keked, and cursed you for thinking of that when I didn't
>>
File: gooey.png (2KB, 133x79px) Image search: [Google]
gooey.png
2KB, 133x79px
This is the best.
>>
>>59923102
I hate --arg and I don't understand /arg

-arg is best
>>
>>59924387
how do you use it in an automated script?
>>
>>59924958
If your operating system isn't stuck in the previous century, then there are tools like Visual Studio Coded UI.

>yfw freetards haven't progressed past the text line interface because they think GUIs can't be automated
>>
>>59923680
obviously
>>
>>59924958
duh... you obviously make the script select the window named "app", type whatever you want as the argument and then presses enter
>>
>>59924285
Program has arguments o, t, u and out.
Is -out o, u and t or out?
>>
>>59923277
Right, but GNU style seems to include weird conventions for options with arguments.

-Wall

Is that one option -Wall that just uses a single hyphen? Is it four options -W -a -l -l? No, it's one option -W with the argument all. But there's no way to tell.

The sane way would be to put a space, or maybe an equals for long options. -W all or --warning=all.

I think getopt_long() is pretty flexible, but it does seem like there's an ambiguous case. I guess it must have some way to tell the difference between -W all and -W -a -l -l.
Thread posts: 28
Thread images: 3


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.