From 1d80028e246b219f981318378a881f4ede03c1c1 Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Tue, 22 Jan 2019 01:12:57 +0100 Subject: [PATCH] __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 ". --- share/functions/__fish_complete_man.fish | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/share/functions/__fish_complete_man.fish b/share/functions/__fish_complete_man.fish index e65d61c07..a8d3daf97 100644 --- a/share/functions/__fish_complete_man.fish +++ b/share/functions/__fish_complete_man.fish @@ -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