mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 04:43:10 +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
71b5591f21
commit
eee4dd8248
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