RPKI Engine  1.0
Public Member Functions | Static Public Attributes
rpki::cli::Cmd Class Reference
Inheritance diagram for rpki::cli::Cmd:
Inheritance graph
Collaboration diagram for rpki::cli::Cmd:
Collaboration graph

List of all members.

Public Member Functions

def __init__
def cmdloop_with_history
def complete_help
def completenames
def do_EOF
def do_exit
def emptyline
def filename_complete
def help_help
def onecmd

Static Public Attributes

 cmdloop_with_history = cmd.Cmd.cmdloop
 do_quit = do_exit
 emptyline_repeats_last_command = False
 EOF_exits_command_loop = True
 histfile = None
string identchars = "/-."

Detailed Description

Customized subclass of Python cmd module.

Definition at line 29 of file cli.py.


Constructor & Destructor Documentation

def rpki::cli::Cmd::__init__ (   self,
  argv = None 
)

Definition at line 42 of file cli.py.

References cmdloop_with_history, and onecmd().

Here is the call graph for this function:


Member Function Documentation

Better command loop, with history file and tweaked readline
completion delimiters.

Definition at line 132 of file cli.py.

References cmdloop_with_history, histfile, and identchars.

def rpki::cli::Cmd::complete_help (   self,
  args 
)
Better completion function for help command arguments.

Definition at line 119 of file cli.py.

def rpki::cli::Cmd::completenames (   self,
  text,
  ignored 
)
Command name completion handler, with hack to restore what I
consider the normal (bash-like) behavior when one hits the
completion key and there's only one match.

Definition at line 101 of file cli.py.

def rpki::cli::Cmd::do_EOF (   self,
  arg 
)
Exit program.

Definition at line 61 of file cli.py.

References EOF_exits_command_loop, and rpki::myrpki::main::prompt.

def rpki::cli::Cmd::do_exit (   self,
  arg 
)
Exit program.

Definition at line 69 of file cli.py.

def rpki::cli::Cmd::emptyline (   self)
Handle an empty line.  cmd module default is to repeat the last
command, which I find to be violation of the principal of least
astonishment, so my preference is that an empty line does nothing.

Definition at line 77 of file cli.py.

References emptyline_repeats_last_command.

def rpki::cli::Cmd::filename_complete (   self,
  text,
  line,
  begidx,
  endidx 
)
Filename completion handler, with hack to restore what I consider
the normal (bash-like) behavior when one hits the completion key
and there's only one match.

Definition at line 86 of file cli.py.

def rpki::cli::Cmd::help_help (   self)
Type "help [topic]" for help on a command,
or just "help" for a list of commands.

Definition at line 112 of file cli.py.

References help_help().

Referenced by help_help().

Here is the call graph for this function:

Here is the caller graph for this function:

def rpki::cli::Cmd::onecmd (   self,
  line 
)
Wrap error handling around cmd.Cmd.onecmd().  Might want to do
something kinder than showing a traceback, eventually.

Definition at line 49 of file cli.py.

Referenced by __init__().

Here is the caller graph for this function:


Member Data Documentation

rpki::cli::Cmd::cmdloop_with_history = cmd.Cmd.cmdloop [static]

Definition at line 153 of file cli.py.

Referenced by __init__(), and cmdloop_with_history().

rpki::cli::Cmd::do_quit = do_exit [static]

Definition at line 75 of file cli.py.

Definition at line 34 of file cli.py.

Referenced by emptyline().

Definition at line 36 of file cli.py.

Referenced by do_EOF().

rpki::cli::Cmd::histfile = None [static]

Reimplemented in rpki::myrpki::main.

Definition at line 40 of file cli.py.

Referenced by cmdloop_with_history().

string rpki::cli::Cmd::identchars = "/-." [static]

Definition at line 38 of file cli.py.

Referenced by cmdloop_with_history().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Properties