Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 43211ec

Browse files
committed
Make some adjustments to the markup, and fix up some style-guide issues.
1 parent db642c6 commit 43211ec

1 file changed

Lines changed: 17 additions & 17 deletions

File tree

Doc/lib/libcmd.tex

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ \section{\module{cmd} ---
1919
\class{Cmd}'s methods and encapsulate action methods.
2020

2121
The optional argument is the \refmodule{readline} name of a completion
22-
key; it defaults to \code{``tab''}. If \var{completekey} is not
23-
\code{None} and \module{readline} is available, command completion is
24-
done automatically.
22+
key; it defaults to \kbd{Tab}. If \var{completekey} is not \code{None}
23+
and \module{readline} is available, command completion is done
24+
automatically.
2525

2626
\end{classdesc}
2727

@@ -51,20 +51,20 @@ \subsection{Cmd Objects}
5151
a line beginning with the character \character{?} is dispatched to
5252
the method \method{do_help()}. As another special case, a line
5353
beginning with the character \character{!} is dispatched to the
54-
method \method{do_shell} (if such a method is defined).
54+
method \method{do_shell()} (if such a method is defined).
5555

5656
If completion is enabled, completing commands will be done
5757
automatically, and completing of commands args is done by calling
58-
\method{complete_foo()} with arguments \samp{text}, \samp{line},
59-
\samp{begidx}, \samp{endidx}. \samp{text} is string we are matching
60-
against, all returned matches must begin with it. \samp{line} is the
61-
current input line (lstripped), \samp{begidx} and \samp{endidx} are
62-
the beginning and end indexes of the text being matched, which could
63-
be used to provide different completion depending upon which position
64-
the argument is in.
65-
66-
All subclasses of \class{Cmd} inherit a predefined \method{do_help}.
67-
This method, called with an argument \code{bar}, invokes the
58+
\method{complete_foo()} with arguments \var{text}, \var{line},
59+
\var{begidx}, and \var{endidx}. \var{text} is the string prefix we
60+
are attempting to match: all returned matches must begin with it.
61+
\var{line} is the current input line with leading whitespace removed,
62+
\var{begidx} and \var{endidx} are the beginning and ending indexes
63+
of the prefix text, which could be used to provide different
64+
completion depending upon which position the argument is in.
65+
66+
All subclasses of \class{Cmd} inherit a predefined \method{do_help()}.
67+
This method, called with an argument \code{'bar'}, invokes the
6868
corresponding method \method{help_bar()}. With no argument,
6969
\method{do_help()} lists all available help topics (that is, all
7070
commands with corresponding \method{help_*()} methods), and also lists
@@ -90,7 +90,7 @@ \subsection{Cmd Objects}
9090

9191
\begin{methoddesc}{completedefault}{text, line, begidx, endidx}
9292
Method called to complete an input line when no command-specific
93-
\code{complete_} method is available. By default, it returns an
93+
\method{complete_*()} method is available. By default, it returns an
9494
empty list.
9595
\end{methoddesc}
9696

@@ -164,8 +164,8 @@ \subsection{Cmd Objects}
164164
\begin{memberdesc}{use_rawinput}
165165
A flag, defaulting to true. If true, \method{cmdloop()} uses
166166
\function{raw_input()} to display a prompt and read the next command;
167-
if false, \function{sys.stdout.write()} and
168-
\function{sys.stdin.readline()} are used. (This means that by
167+
if false, \method{sys.stdout.write()} and
168+
\method{sys.stdin.readline()} are used. (This means that by
169169
importing \module{readline}, on systems that support it, the
170170
interpreter will automatically support Emacs-like line editing
171171
and command-history keystrokes.)

0 commit comments

Comments
 (0)