mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-25 09:39:52 +08:00
docs: Add labels to all commands
This allows us to use :ref: references, which don't require hardcoding it as html [ci skip]
This commit is contained in:
parent
c693687812
commit
cf9b8fa3fa
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-abbr:
|
||||||
|
|
||||||
abbr - manage fish abbreviations
|
abbr - manage fish abbreviations
|
||||||
================================
|
================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-alias:
|
||||||
|
|
||||||
alias - create a function
|
alias - create a function
|
||||||
=========================
|
=========================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-and:
|
||||||
|
|
||||||
and - conditionally execute a command
|
and - conditionally execute a command
|
||||||
=====================================
|
=====================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-argparse:
|
||||||
|
|
||||||
argparse - parse options passed to a fish script or function
|
argparse - parse options passed to a fish script or function
|
||||||
============================================================
|
============================================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-begin:
|
||||||
|
|
||||||
begin - start a new block of code
|
begin - start a new block of code
|
||||||
=================================
|
=================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-bg:
|
||||||
|
|
||||||
bg - send jobs to background
|
bg - send jobs to background
|
||||||
============================
|
============================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-bind:
|
||||||
|
|
||||||
bind - handle fish key bindings
|
bind - handle fish key bindings
|
||||||
===============================
|
===============================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-block:
|
||||||
|
|
||||||
block - temporarily block delivery of events
|
block - temporarily block delivery of events
|
||||||
============================================
|
============================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-break:
|
||||||
|
|
||||||
break - stop the current inner loop
|
break - stop the current inner loop
|
||||||
===================================
|
===================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-breakpoint:
|
||||||
|
|
||||||
breakpoint - Launch debug mode
|
breakpoint - Launch debug mode
|
||||||
==============================
|
==============================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-builtin:
|
||||||
|
|
||||||
builtin - run a builtin command
|
builtin - run a builtin command
|
||||||
===============================
|
===============================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-case:
|
||||||
|
|
||||||
case - conditionally execute a block of commands
|
case - conditionally execute a block of commands
|
||||||
================================================
|
================================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-cd:
|
||||||
|
|
||||||
cd - change directory
|
cd - change directory
|
||||||
=====================
|
=====================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-cdh:
|
||||||
|
|
||||||
cdh - change to a recently visited directory
|
cdh - change to a recently visited directory
|
||||||
============================================
|
============================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-command:
|
||||||
|
|
||||||
command - run a program
|
command - run a program
|
||||||
=======================
|
=======================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-commandline:
|
||||||
|
|
||||||
commandline - set or get the current command line buffer
|
commandline - set or get the current command line buffer
|
||||||
========================================================
|
========================================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-complete:
|
||||||
|
|
||||||
complete - edit command specific tab-completions
|
complete - edit command specific tab-completions
|
||||||
================================================
|
================================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-contains:
|
||||||
|
|
||||||
contains - test if a word is present in a list
|
contains - test if a word is present in a list
|
||||||
==============================================
|
==============================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-continue:
|
||||||
|
|
||||||
continue - skip the remainder of the current iteration of the current inner loop
|
continue - skip the remainder of the current iteration of the current inner loop
|
||||||
================================================================================
|
================================================================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-count:
|
||||||
|
|
||||||
count - count the number of elements of an array
|
count - count the number of elements of an array
|
||||||
================================================
|
================================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-dirh:
|
||||||
|
|
||||||
dirh - print directory history
|
dirh - print directory history
|
||||||
==============================
|
==============================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-dirs:
|
||||||
|
|
||||||
dirs - print directory stack
|
dirs - print directory stack
|
||||||
============================
|
============================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-disown:
|
||||||
|
|
||||||
disown - remove a process from the list of jobs
|
disown - remove a process from the list of jobs
|
||||||
===============================================
|
===============================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-echo:
|
||||||
|
|
||||||
echo - display a line of text
|
echo - display a line of text
|
||||||
=============================
|
=============================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-else:
|
||||||
|
|
||||||
else - execute command if a condition is not met
|
else - execute command if a condition is not met
|
||||||
================================================
|
================================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-emit:
|
||||||
|
|
||||||
emit - Emit a generic event
|
emit - Emit a generic event
|
||||||
===========================
|
===========================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-end:
|
||||||
|
|
||||||
end - end a block of commands.
|
end - end a block of commands.
|
||||||
==============================
|
==============================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-eval:
|
||||||
|
|
||||||
eval - evaluate the specified commands
|
eval - evaluate the specified commands
|
||||||
======================================
|
======================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-exec:
|
||||||
|
|
||||||
exec - execute command in current process
|
exec - execute command in current process
|
||||||
=========================================
|
=========================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-exit:
|
||||||
|
|
||||||
exit - exit the shell
|
exit - exit the shell
|
||||||
=====================
|
=====================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-false:
|
||||||
|
|
||||||
false - return an unsuccessful result
|
false - return an unsuccessful result
|
||||||
=====================================
|
=====================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-fg:
|
||||||
|
|
||||||
fg - bring job to foreground
|
fg - bring job to foreground
|
||||||
============================
|
============================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-fish:
|
||||||
|
|
||||||
fish - the friendly interactive shell
|
fish - the friendly interactive shell
|
||||||
=====================================
|
=====================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-fish_breakpoint_prompt:
|
||||||
|
|
||||||
fish_breakpoint_prompt - define the prompt when stopped at a breakpoint
|
fish_breakpoint_prompt - define the prompt when stopped at a breakpoint
|
||||||
=======================================================================
|
=======================================================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-fish_config:
|
||||||
|
|
||||||
fish_config - start the web-based configuration interface
|
fish_config - start the web-based configuration interface
|
||||||
=========================================================
|
=========================================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-fish_git_prompt:
|
||||||
|
|
||||||
fish_git_prompt - output git information for use in a prompt
|
fish_git_prompt - output git information for use in a prompt
|
||||||
============================================================
|
============================================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-fish_hg_prompt:
|
||||||
|
|
||||||
fish_hg_prompt - output mercurial information for use in a prompt
|
fish_hg_prompt - output mercurial information for use in a prompt
|
||||||
=================================================================
|
=================================================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-fish_indent:
|
||||||
|
|
||||||
fish_indent - indenter and prettifier
|
fish_indent - indenter and prettifier
|
||||||
=====================================
|
=====================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-fish_key_reader:
|
||||||
|
|
||||||
fish_key_reader - explore what characters keyboard keys send
|
fish_key_reader - explore what characters keyboard keys send
|
||||||
============================================================
|
============================================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-fish_mode_prompt:
|
||||||
|
|
||||||
fish_mode_prompt - define the appearance of the mode indicator
|
fish_mode_prompt - define the appearance of the mode indicator
|
||||||
==============================================================
|
==============================================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-fish_opt:
|
||||||
|
|
||||||
fish_opt - create an option spec for the argparse command
|
fish_opt - create an option spec for the argparse command
|
||||||
=========================================================
|
=========================================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-fish_prompt:
|
||||||
|
|
||||||
fish_prompt - define the appearance of the command line prompt
|
fish_prompt - define the appearance of the command line prompt
|
||||||
==============================================================
|
==============================================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-fish_right_prompt:
|
||||||
|
|
||||||
fish_right_prompt - define the appearance of the right-side command line prompt
|
fish_right_prompt - define the appearance of the right-side command line prompt
|
||||||
===============================================================================
|
===============================================================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-fish_svn_prompt:
|
||||||
|
|
||||||
fish_svn_prompt - output svn information for use in a prompt
|
fish_svn_prompt - output svn information for use in a prompt
|
||||||
============================================================
|
============================================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-fish_update_completions:
|
||||||
|
|
||||||
fish_update_completions - Update completions using manual pages
|
fish_update_completions - Update completions using manual pages
|
||||||
===============================================================
|
===============================================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-fish_vcs_prompt:
|
||||||
|
|
||||||
fish_vcs_prompt - output vcs information for use in a prompt
|
fish_vcs_prompt - output vcs information for use in a prompt
|
||||||
============================================================
|
============================================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-fish_vi_mode:
|
||||||
|
|
||||||
fish_vi_mode - Enable vi mode
|
fish_vi_mode - Enable vi mode
|
||||||
=============================
|
=============================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-for:
|
||||||
|
|
||||||
for - perform a set of commands multiple times.
|
for - perform a set of commands multiple times.
|
||||||
===============================================
|
===============================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-funced:
|
||||||
|
|
||||||
funced - edit a function interactively
|
funced - edit a function interactively
|
||||||
======================================
|
======================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-funcsave:
|
||||||
|
|
||||||
funcsave - save the definition of a function to the user's autoload directory
|
funcsave - save the definition of a function to the user's autoload directory
|
||||||
=============================================================================
|
=============================================================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-function:
|
||||||
|
|
||||||
function - create a function
|
function - create a function
|
||||||
============================
|
============================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-functions:
|
||||||
|
|
||||||
functions - print or erase functions
|
functions - print or erase functions
|
||||||
====================================
|
====================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-help:
|
||||||
|
|
||||||
help - display fish documentation
|
help - display fish documentation
|
||||||
=================================
|
=================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-history:
|
||||||
|
|
||||||
history - Show and manipulate command history
|
history - Show and manipulate command history
|
||||||
=============================================
|
=============================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-if:
|
||||||
|
|
||||||
if - conditionally execute a command
|
if - conditionally execute a command
|
||||||
====================================
|
====================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-isatty:
|
||||||
|
|
||||||
isatty - test if a file descriptor is a tty.
|
isatty - test if a file descriptor is a tty.
|
||||||
============================================
|
============================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-jobs:
|
||||||
|
|
||||||
jobs - print currently running jobs
|
jobs - print currently running jobs
|
||||||
===================================
|
===================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-math:
|
||||||
|
|
||||||
math - Perform mathematics calculations
|
math - Perform mathematics calculations
|
||||||
=======================================
|
=======================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-nextd:
|
||||||
|
|
||||||
nextd - move forward through directory history
|
nextd - move forward through directory history
|
||||||
==============================================
|
==============================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-not:
|
||||||
|
|
||||||
not - negate the exit status of a job
|
not - negate the exit status of a job
|
||||||
=====================================
|
=====================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-open:
|
||||||
|
|
||||||
open - open file in its default application
|
open - open file in its default application
|
||||||
===========================================
|
===========================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-or:
|
||||||
|
|
||||||
or - conditionally execute a command
|
or - conditionally execute a command
|
||||||
====================================
|
====================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-popd:
|
||||||
|
|
||||||
popd - move through directory stack
|
popd - move through directory stack
|
||||||
===================================
|
===================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-prevd:
|
||||||
|
|
||||||
prevd - move backward through directory history
|
prevd - move backward through directory history
|
||||||
===============================================
|
===============================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-printf:
|
||||||
|
|
||||||
printf - display text according to a format string
|
printf - display text according to a format string
|
||||||
==================================================
|
==================================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-prompt_pwd:
|
||||||
|
|
||||||
prompt_pwd - Print pwd suitable for prompt
|
prompt_pwd - Print pwd suitable for prompt
|
||||||
==========================================
|
==========================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-psub:
|
||||||
|
|
||||||
psub - perform process substitution
|
psub - perform process substitution
|
||||||
===================================
|
===================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-pushd:
|
||||||
|
|
||||||
pushd - push directory to directory stack
|
pushd - push directory to directory stack
|
||||||
=========================================
|
=========================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-pwd:
|
||||||
|
|
||||||
pwd - output the current working directory
|
pwd - output the current working directory
|
||||||
==========================================
|
==========================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-random:
|
||||||
|
|
||||||
random - generate random number
|
random - generate random number
|
||||||
===============================
|
===============================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-read:
|
||||||
|
|
||||||
read - read line of input into variables
|
read - read line of input into variables
|
||||||
========================================
|
========================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-realpath:
|
||||||
|
|
||||||
realpath - Convert a path to an absolute path without symlinks
|
realpath - Convert a path to an absolute path without symlinks
|
||||||
==============================================================
|
==============================================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-return:
|
||||||
|
|
||||||
return - stop the current inner function
|
return - stop the current inner function
|
||||||
========================================
|
========================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-set:
|
||||||
|
|
||||||
set - display and change shell variables.
|
set - display and change shell variables.
|
||||||
=========================================
|
=========================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-set_color:
|
||||||
|
|
||||||
set_color - set the terminal color
|
set_color - set the terminal color
|
||||||
==================================
|
==================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-source:
|
||||||
|
|
||||||
source - evaluate contents of file.
|
source - evaluate contents of file.
|
||||||
===================================
|
===================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-status:
|
||||||
|
|
||||||
status - query fish runtime information
|
status - query fish runtime information
|
||||||
=======================================
|
=======================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-string:
|
||||||
|
|
||||||
string - manipulate strings
|
string - manipulate strings
|
||||||
===========================
|
===========================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-suspend:
|
||||||
|
|
||||||
suspend - suspend the current shell
|
suspend - suspend the current shell
|
||||||
===================================
|
===================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-switch:
|
||||||
|
|
||||||
switch - conditionally execute a block of commands
|
switch - conditionally execute a block of commands
|
||||||
==================================================
|
==================================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-test:
|
||||||
|
|
||||||
test - perform tests on files and text
|
test - perform tests on files and text
|
||||||
======================================
|
======================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-trap:
|
||||||
|
|
||||||
trap - perform an action when the shell receives a signal
|
trap - perform an action when the shell receives a signal
|
||||||
=========================================================
|
=========================================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-true:
|
||||||
|
|
||||||
true - return a successful result
|
true - return a successful result
|
||||||
=================================
|
=================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-type:
|
||||||
|
|
||||||
type - indicate how a command would be interpreted
|
type - indicate how a command would be interpreted
|
||||||
==================================================
|
==================================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-ulimit:
|
||||||
|
|
||||||
ulimit - set or get resource usage limits
|
ulimit - set or get resource usage limits
|
||||||
=========================================
|
=========================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-umask:
|
||||||
|
|
||||||
umask - set or get the file creation mode mask
|
umask - set or get the file creation mode mask
|
||||||
==============================================
|
==============================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-vared:
|
||||||
|
|
||||||
vared - interactively edit the value of an environment variable
|
vared - interactively edit the value of an environment variable
|
||||||
===============================================================
|
===============================================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-wait:
|
||||||
|
|
||||||
wait - wait for jobs to complete
|
wait - wait for jobs to complete
|
||||||
================================
|
================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _cmd-while:
|
||||||
|
|
||||||
while - perform a command multiple times
|
while - perform a command multiple times
|
||||||
========================================
|
========================================
|
||||||
|
|
||||||
|
|
|
@ -144,14 +144,15 @@ latex_documents = [
|
||||||
|
|
||||||
# -- Options for manual page output ------------------------------------------
|
# -- Options for manual page output ------------------------------------------
|
||||||
|
|
||||||
def get_command_description(path):
|
def get_command_description(path, name):
|
||||||
""" Return the description for a command, by parsing its first line """
|
""" Return the description for a command, by parsing its synopsis line """
|
||||||
with open(path) as fd:
|
with open(path) as fd:
|
||||||
title = fd.readline()
|
for line in fd:
|
||||||
if ' - ' not in title:
|
if line.startswith(name + " - "):
|
||||||
raise SphinxWarning('No description in file %s' % os.path.basename(path))
|
_, desc = line.split(' - ', 1)
|
||||||
_, desc = title.split(' - ', 1)
|
return desc.strip()
|
||||||
return desc.strip()
|
raise SphinxWarning('No description in file %s' % os.path.basename(path))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# One entry per manual page. List of tuples
|
# One entry per manual page. List of tuples
|
||||||
|
@ -163,7 +164,7 @@ man_pages = [
|
||||||
for path in sorted(glob.glob('cmds/*')):
|
for path in sorted(glob.glob('cmds/*')):
|
||||||
docname = strip_ext(path)
|
docname = strip_ext(path)
|
||||||
cmd = os.path.basename(docname)
|
cmd = os.path.basename(docname)
|
||||||
man_pages.append((docname, cmd, get_command_description(path), '', 1))
|
man_pages.append((docname, cmd, get_command_description(path, cmd), '', 1))
|
||||||
|
|
||||||
|
|
||||||
# -- Options for Texinfo output ----------------------------------------------
|
# -- Options for Texinfo output ----------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue
Block a user