aboutsummaryrefslogtreecommitdiffhomepage
path: root/share/functions/help.fish
diff options
context:
space:
mode:
authorGravatar Dylan Smith <dylan.ah.smith@gmail.com>2010-11-23 23:37:09 +0800
committerGravatar Grissiom <chaos.proton@gmail.com>2010-11-23 23:37:09 +0800
commit5fca92994ff94a0806413efe21f24f5f99b9e423 (patch)
tree61c3aa4688830a8b8a9f06a02ddedf7ac69f763d /share/functions/help.fish
parentfefd17fe5e8ae629dff0ccb0565d0dcfb3a5efb0 (diff)
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>
Diffstat (limited to 'share/functions/help.fish')
-rw-r--r--share/functions/help.fish2
1 files changed, 1 insertions, 1 deletions
diff --git a/share/functions/help.fish b/share/functions/help.fish
index bd536002..9531c103 100644
--- a/share/functions/help.fish
+++ b/share/functions/help.fish
@@ -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"