mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-29 06:13:20 +00:00
__fish_complete_man.fish: escape for regex
Previously, using special regex characters or slashes would result in an error message, when pressing tab in a command-line such as "man /usr/bin/time ".
This commit is contained in:
parent
a1df72dbb6
commit
1d80028e24
1 changed files with 2 additions and 1 deletions
|
@ -10,7 +10,8 @@ function __fish_complete_man
|
|||
case '-**'
|
||||
|
||||
case '*'
|
||||
set section $prev[1]
|
||||
set section (string escape --style=regex $prev[1])
|
||||
set section (string replace --all / \\/ $section)
|
||||
end
|
||||
set -e prev[1]
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue