#getopt — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #getopt, aggregated by home.social.
-
My #emulator takes a ROM filename on the #CommandLine, among other options. I use the #musl library's #getopt to parse the command in C. It makes me appreciate the libraries that come with newer languages like Python. youtu.be/PAw478XJYWI #FamilySizeVM #emudev #CLI #timelapse #emulator
Parsing a command line in C is... -
My #emulator takes a ROM filename on the #CommandLine, among other options. I use the #musl library's #getopt to parse the command in C. It makes me appreciate the libraries that come with newer languages like Python. youtu.be/PAw478XJYWI #FamilySizeVM #emudev #CLI #timelapse #emulator
Parsing a command line in C is... -
My #emulator takes a ROM filename on the #CommandLine, among other options. I use the #musl library's #getopt to parse the command in C. It makes me appreciate the libraries that come with newer languages like Python. youtu.be/PAw478XJYWI #FamilySizeVM #emudev #CLI #timelapse #emulator
Parsing a command line in C is... -
My #emulator takes a ROM filename on the #CommandLine, among other options. I use the #musl library's #getopt to parse the command in C. It makes me appreciate the libraries that come with newer languages like Python. youtu.be/PAw478XJYWI #FamilySizeVM #emudev #CLI #timelapse #emulator
Parsing a command line in C is... -
My emulator takes a path to a ROM image on the command line, among other options. I use the musl library's getopt_long function to parse the command in C. It makes me appreciate the libraries that come with newer languages like Python.
https://youtu.be/PAw478XJYWI#FamilySizeVM #emudev #NESdev #CommandLine #CLI #musl #getopt #timelapse #emulator
-
My emulator takes a path to a ROM image on the command line, among other options. I use the musl library's getopt_long function to parse the command in C. It makes me appreciate the libraries that come with newer languages like Python.
https://youtu.be/PAw478XJYWI#FamilySizeVM #emudev #NESdev #CommandLine #CLI #musl #getopt #timelapse #emulator
-
My emulator takes a path to a ROM image on the command line, among other options. I use the musl library's getopt_long function to parse the command in C. It makes me appreciate the libraries that come with newer languages like Python.
https://youtu.be/PAw478XJYWI#FamilySizeVM #emudev #NESdev #CommandLine #CLI #musl #getopt #timelapse #emulator
-
My emulator takes a path to a ROM image on the command line, among other options. I use the musl library's getopt_long function to parse the command in C. It makes me appreciate the libraries that come with newer languages like Python.
https://youtu.be/PAw478XJYWI#FamilySizeVM #emudev #NESdev #CommandLine #CLI #musl #getopt #timelapse #emulator
-
My emulator takes a path to a ROM image on the command line, among other options. I use the musl library's getopt_long function to parse the command in C. It makes me appreciate the libraries that come with newer languages like Python.
https://youtu.be/PAw478XJYWI#FamilySizeVM #emudev #NESdev #CommandLine #CLI #musl #getopt #timelapse #emulator
-
I am the voice of experience:
@rl_dane was talking about getopt yesterday, and I found that I was running a /usr/local/bin/getopt from ports with very different handling of '--' (alluded to by @steeph , so I had been checking it out) to the actual #FreeBSD /usr/bin/getopt on the machine.
I wouldn't be surprised if I'm running a different /usr/bin/grep (I checked that.) to you. "I'm using FreeBSD grep." has famously been two entirely different programs over the years.
-
I was about to write the same thing.
And as @steeph pointed out, getopt in shell script does not allow one to do several things, including take advantage of the Z shell's ability to automatically construct command-line completions for anything that supports --help .
-
My first suspect for a #login not supporting -- would be something with a 1980s history pre-dating standard #getopt, such as Solaris, which is ironic given that #inetutils has its only -- present in conditionally compiled code targetting Solaris.
#FreeBSD, #NetBSD, and #OpenBSD login all use getopt(), pervasive in these worlds for decades, as do the util-linux login (used by Debian et al.), and the #Illumos and #BusyBox logins.
#suckless login supports -- via ARGBEGIN.
-
Looking at the commit and the code as it still stands today, it is interesting that only on Solaris does it even try to use -- in the arguments to login to signal the end of options, and even then only in limited circumstances.
#FreeBSD telnetd, for comparison, always puts -- in before the supplied account name.
I wonder how long it will be before the lesson is properly learned.
-
#SolucionarioDelProgramador #GNU_linux : Parámetros línea de Comandos en #lua
#programming #programacion #getopt
https://ibolcode.net/roor/2025-11-parametros-linea-de-comandos--lua
-
#SolucionarioDelProgramador #GNU_linux : Parámetros línea de Comandos en #bash
#programming #programacion #cmdline #ARGV #Getopt #ShellScripts #shell
https://ibolcode.net/roor/2025-10-parametros-linea-de-comandos--bash