[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Help function for lua
- From: Sean Conner <sean@...>
- Date: Sat, 18 Jan 2020 20:44:14 -0500
It was thus said that the Great Viacheslav Usov once stated:
>
> Unix/Windows shell would be a prime example that I use interactively, and
> getting help there always feels awkward and fiddly. Tab completion is
> useful when whatever you are trying to use is already kind of familiar. A
> man page or built-in --help content is typically a (tall) wall of text, and
> it is quite a challenge to pick commands/options/arguments that are needed
> for the task at hand, given that you have to build up your command line in
> the very same console/terminal you are using to get help. I frequently end
> up opening another console/terminal or some scratch pad, and that is
> already similar yet inferior to having a browser instead of that.
The interactive shell on Cisco routers (and other brands as well) are very
nice. At any point in the command, you can hit '?' to get a list of options
at that point in the command. So for instance (it's been over a decade
since I last used a Cisco router, so this is my best recreation of it):
% ?
show - show details about the system
interface - configure an interface
ip - IP related commands
% interface ?
Ethernet0/0
Ethernet0/1
Ethernet1/0
Ethernet1/1
% interface Ethernet0/0 ?
description - set description of port
ip - set IP address
spanning-tree - set/clear spanning-tree
% interface Ethernet0/0 description ?
A free form string
% interface Ethernet0/0 description This is Pete's computer
%
Also, you only need enough of each component to differenticate it from
other components at the same level:
% int Ethernet0/0 desc This is Pete's computer
They also have the concept of "running config" and "start up config".
Changes made only affect the currently running configuration; it's another
command to persist the changes through a reboot.
-spc