gerbil
gerbil copied to clipboard
Add the getopt for muliple `-o`'s to become a list
ie:
> (begin
(import :drewc/fuse/getopt)
(def go (getopt (option 'fuse-opts "-o")
(argument '<mountpoint> help: "The directory to mount")))
(def args ["-o" "allow_other" "-o" "foo" "/tmp/gfuse-test"])
(def go-args (getopt-parse go args))
(table->list go-args))
=> ((fuse-opts "allow_other" "foo")
(<mountpoint> . "/tmp/gfuse-test"))
I welcome this feature, but it should be a new kind of list-option
or some such, not a backward incompatible change in the existing option
.
Makes sense to me. list-option
it is, will come shortly.
On Sat, Dec 25, 2021 at 11:58 AM François-René Rideau < @.***> wrote:
I welcome this feature, but it should be a new kind of list-option or some such, not a backward incompatible change in the existing option.
— Reply to this email directly, view it on GitHub https://github.com/vyzo/gerbil/pull/648#issuecomment-1001067019, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADVTXLAFJBIAOCV45LNKITUSYO4RANCNFSM5KYDLWRA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you authored the thread.Message ID: @.***>
Thinking more about it, I don't like the name list-option
. I prefer something like repeatable-option
in this case, by contrast with say an option followed by a string parsed as a comma-separated list of keywords and/or keyword=value
bindings, as commonly seen in many Unix utilities.
While we're discussing getopt—I would like to modify how the help work and/or make the display more configurable. In particular I don't like that it display :
after the name of sub-commands, or two spaces between the command name and the <command> command-arg ...
thing. Maybe we should also add command aliases like option aliases.
go for it!
On Sun, Dec 26, 2021, 08:18 François-René Rideau @.***> wrote:
While we're discussing getopt—I would like to modify how the help work and/or make the display more configurable. In particular I don't like that it display : after the name of sub-commands, or two spaces between the command name and the
command-arg ... thing. Maybe we should also add command aliases like option aliases. — Reply to this email directly, view it on GitHub https://github.com/vyzo/gerbil/pull/648#issuecomment-1001112209, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAI4SRODWRBV3Q5BWJLXJLUS2XUFANCNFSM5KYDLWRA . You are receiving this because you commented.Message ID: @.***>
this has random cruft, closing.