Use dashes instead of underscores pervasively in tutorial anchors

This fixes some broken help completions.
This commit is contained in:
ridiculousfish 2020-07-31 12:06:40 -07:00
parent c940af1600
commit 1c2323e76f
3 changed files with 30 additions and 30 deletions

View file

@ -265,7 +265,7 @@ To give a variable to an external command, it needs to be "exported". Unlike oth
It can also be unexported with ``--unexport`` or ``-u``.
.. _tut_lists:
.. _tut-lists:
Lists
-----
@ -380,7 +380,7 @@ Unlike other shells, fish does not split command substitutions on any whitespace
-lglib-2.0
.. _tut_semicolon:
.. _tut-semicolon:
Separating Commands (Semicolon)
-------------------------------
@ -434,7 +434,7 @@ fish also supports :ref:`and <cmd-and>`, :ref:`or <cmd-or>`, and :ref:`not <cmd-
Backup failed
As mentioned in :ref:`the section on the semicolon <tut_semicolon>`, this can also be written in multiple lines, like so::
As mentioned in :ref:`the section on the semicolon <tut-semicolon>`, this can also be written in multiple lines, like so::
cp file1.txt file1_bak.txt && cp file2.txt file2_bak.txt
and echo "Backup successful"
@ -606,7 +606,7 @@ You can choose among some sample prompts by running ``fish_config prompt``. ``fi
$PATH
-----
``$PATH`` is an environment variable containing the directories that ``fish`` searches for commands. Unlike other shells, $PATH is a :ref:`list <tut_lists>`, not a colon-delimited string.
``$PATH`` is an environment variable containing the directories that ``fish`` searches for commands. Unlike other shells, $PATH is a :ref:`list <tut-lists>`, not a colon-delimited string.
To prepend /usr/local/bin and /usr/sbin to ``$PATH``, you can write::

View file

@ -74,28 +74,28 @@ complete -c help -x -a completion-path -d 'Where to put completions'
# Tutorial
complete -c help -x -a tutorial -d Tutorial
complete -c help -x -a tut_autoload -d 'Autoloading Functions'
complete -c help -x -a tut_autosuggestions -d Autosuggestions
complete -c help -x -a tut_combiners -d 'Combiners (And, Or, Not)'
complete -c help -x -a tut_command_substitutions -d 'Command Substitutions'
complete -c help -x -a tut_conditionals -d 'Conditionals (If, Else, Switch)'
complete -c help -x -a tut_exit_status -d 'Exit Status'
complete -c help -x -a tut_exports -d 'Exports (Shell Variables)'
complete -c help -x -a tut_functions -d Functions
complete -c help -x -a tut_getting_help -d 'Getting Help'
complete -c help -x -a tut_learning_Fish -d 'Learning fish'
complete -c help -x -a tut_lists -d Lists
complete -c help -x -a tut_loops -d Loops
complete -c help -x -a tut_more -d 'Ready for more?'
complete -c help -x -a tut_path -d '$PATH'
complete -c help -x -a tut_pipes_and_redirections -d 'Pipes and Redirections'
complete -c help -x -a tut_prompt -d Prompt
complete -c help -x -a tut_running_commands -d 'Running Commands'
complete -c help -x -a tut_semicolon -d 'Separating Commands (Semicolon)'
complete -c help -x -a tut_startup -d "Startup (Where's .bashrc?)"
complete -c help -x -a tut_syntax_highlighting -d 'Syntax Highlighting'
complete -c help -x -a tut_tab_completions -d 'Tab Completions'
complete -c help -x -a tut_universal -d 'Universal Variables'
complete -c help -x -a tut_variables -d Variables
complete -c help -x -a tut_why_fish -d 'Why fish?'
complete -c help -x -a tut_wildcards -d Wildcards
complete -c help -x -a tut-autoload -d 'Autoloading Functions'
complete -c help -x -a tut-autosuggestions -d Autosuggestions
complete -c help -x -a tut-combiners -d 'Combiners (And, Or, Not)'
complete -c help -x -a tut-command_substitutions -d 'Command Substitutions'
complete -c help -x -a tut-conditionals -d 'Conditionals (If, Else, Switch)'
complete -c help -x -a tut-exit_status -d 'Exit Status'
complete -c help -x -a tut-exports -d 'Exports (Shell Variables)'
complete -c help -x -a tut-functions -d Functions
complete -c help -x -a tut-getting_help -d 'Getting Help'
complete -c help -x -a tut-learning_Fish -d 'Learning fish'
complete -c help -x -a tut-lists -d Lists
complete -c help -x -a tut-loops -d Loops
complete -c help -x -a tut-more -d 'Ready for more?'
complete -c help -x -a tut-path -d '$PATH'
complete -c help -x -a tut-pipes_and_redirections -d 'Pipes and Redirections'
complete -c help -x -a tut-prompt -d Prompt
complete -c help -x -a tut-running_commands -d 'Running Commands'
complete -c help -x -a tut-semicolon -d 'Separating Commands (Semicolon)'
complete -c help -x -a tut-startup -d "Startup (Where's .bashrc?)"
complete -c help -x -a tut-syntax_highlighting -d 'Syntax Highlighting'
complete -c help -x -a tut-tab_completions -d 'Tab Completions'
complete -c help -x -a tut-universal -d 'Universal Variables'
complete -c help -x -a tut-variables -d Variables
complete -c help -x -a tut-why_fish -d 'Why fish?'
complete -c help -x -a tut-wildcards -d Wildcards

View file

@ -121,7 +121,7 @@ function help --description 'Show help for the fish shell'
set fish_help_page "cmds/$fish_help_item.html"
case 'completion-*'
set fish_help_page "completions.html#$fish_help_item"
case 'tut_*'
case 'tut-*'
set fish_help_page "tutorial.html#"(string sub -s 5 -- $fish_help_item | string replace -a -- _ -)
case tutorial
set fish_help_page "tutorial.html"