[Toybox] RFC: "ps -o ?", "logger -p ?", "kill -s ?"
Rob Landley
rob at landley.net
Tue Feb 20 10:15:40 PST 2018
A lot of commands take a list of possible inputs to one of their options, and
there should be a way to query "what are the inputs". The way qemu does it is to
let you supply ? as the input (ala "qemu-system-i386 -M ?")
The problem is ? is a shell wildcard so you have to quote it. Otherwise it works
_almost_ all the time, and then barfs if you have a single character filename in
your current directory because the shell swapped it out before running your command.
Is there an obvious better api for this?
Advantages of the qemu approach are A) a certain number of people out there are
already familiar with this, B) if you see "ps -o ?" even once it's pretty easy
to guess/remember what it does. Much more so than say "ps -o -". Disadvantage is
shell wildcard...
Hmmm...
Rob
More information about the Toybox
mailing list