From 900a8a140896fbac4c0b6215560ef620322634d2 Mon Sep 17 00:00:00 2001 From: David Adam Date: Mon, 30 Mar 2015 15:13:04 +0800 Subject: [PATCH] __fish_complete_python: fix regex to be POSIX-compatible Closes #2004. --- share/functions/__fish_complete_python.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/functions/__fish_complete_python.fish b/share/functions/__fish_complete_python.fish index 46d2e5d8a..4fccdc435 100644 --- a/share/functions/__fish_complete_python.fish +++ b/share/functions/__fish_complete_python.fish @@ -18,7 +18,7 @@ function __fish_complete_python -d 'Make completion for python' --argument-names complete -c $cmd -a "(__fish_complete_suffix .py)" complete -c $cmd -a '-' -d 'Read program from stdin' - switch (eval $cmd -V 2>&1 | head -n1 | sed 's/^.*\s\([23]\)\..*/\1/') + switch (eval $cmd -V 2>&1 | head -n1 | sed 's/^.*[[:space:]]\([23]\)\..*/\1/') case 2 complete -c $cmd -s 3 -d 'Warn about Python 3.x incompatibilities that 2to3 cannot trivially fix' complete -c $cmd -s t --description "Warn on mixed tabs and spaces"