mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-17 06:52:44 +08:00
help.fish: Fix the sed expression to find anchors with id or name
Previously the expression only searched for anchors with a name attribute, but doxygen 1.7.1 is producing anchors with the id attribute instead. The sed expression allows both cases for compatibility. I also used single quotes for the sed expression to avoid escaping double quotes. Signed-off-by: Grissiom <chaos.proton@gmail.com>
This commit is contained in:
parent
fefd17fe5e
commit
5fca92994f
|
@ -86,7 +86,7 @@ function help --description "Show help for the fish shell"
|
|||
# documentation. It's a bit of a hack, since it relies on the
|
||||
# Doxygen markup format to never change.
|
||||
|
||||
case (sed -n < $__fish_help_dir/commands.html -e "s/.*<h2><a class=\"anchor\" name=\"\([^\"]*\)\">.*/\1/p")
|
||||
case (sed -n 's/.*<h2><a class="anchor" \(id\|name\)="\([^"]*\)">.*/\2/p' $__fish_help_dir/commands.html)
|
||||
set fish_help_page "commands.html\#$fish_help_item"
|
||||
case $help_topics
|
||||
set fish_help_page "index.html\#$fish_help_item"
|
||||
|
|
Loading…
Reference in New Issue
Block a user