mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-21 01:04:10 +08: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
@ -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…
x
Reference in New Issue
Block a user