Ask Completely different is a query and reply web site for energy customers of Apple {hardware} and software program. It solely takes a minute to enroll.
Anyone can ask a query
Anyone can reply
The most effective solutions are voted up and rise to the highest
Requested
Considered
10 occasions
I am attempting to make some kind of GUI for the zsh/bash terminal, simply as a enjoyable studying challenge, however most instructions in zsh/bash want you to place in some kind of further enter, alongside simply the command. Is there a technique to get this information and parse it with any programming language, so I can get the consumer to present all of the enter wanted with out them needing to know the way the command works (they are going to possible have to know slightly, although)? Here is what I’ve discovered to date:
- I can get all of the execs from usr/bin, and open their hex.
- I can discover this location utilizing the which command.
- I feel there’s a instrument in the identical location that may learn the hex? (debinhex.pl)
- Some instructions have a assist command, however all of them work in another way.
1
The reason of the varied zsh/bash instructions builtin the shell itself in addition to of any Unix binaries residing anyplace in PATH
might be discovered within the respective man
web page (so man bash
provides you the guide web page for bash
, man ls
provides you the guide web page for ls
). The textual content supply of those guide pages is in /usr/share/man
(no less than for the usual set of instructions) however formatted extra for visible rendering than for automated parsing (so there isn’t any simple technique to derive command choices out of them). I additionally do not see an automatic technique to deal with instructions with conflicting choices (even rm
has these).
So that you may be higher off by limiting your GUI to a small set of generally used instructions, construct consumer steering for these and seek advice from the man
pages for others.
You need to log in to reply this query.
Not the reply you are on the lookout for? Browse different questions tagged .
default