From 90df44b6c29926f05957cef781ef22d374c8cb6a Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Fri, 27 Nov 2015 09:47:55 +1300 Subject: Strip colons from COMP_WORDBREAKS E13 --- bash/bashrc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/bash/bashrc b/bash/bashrc index a8c4b498..ddd3ce3b 100644 --- a/bash/bashrc +++ b/bash/bashrc @@ -98,11 +98,12 @@ if ((BASH_VERSINFO[0] == 4)) ; then fi fi -# Set a simpler custom COMPWORDS to exclude colons; a colon, even unescaped, is -# not part of the shell syntax and it could well be part of filenames, so it -# should not be subject to wordsplitting in completion. Otherwise it messes up -# completion for e.g. Perl library man(1) pages (Net::DNS, Perl::Critic etc) -COMP_WORDBREAKS=' ><=;|&("'\'$'\n' +# If COMP_WORDBREAKS has a value, strip all colons from it; this allows +# completing filenames correctly, since an unquoted colon is not a syntactic +# character: (E13) +if [[ $COMP_WORDBREAKS ]] ; then + COMP_WORDBREAKS=${COMP_WORDBREAKS//:} +fi # Load any supplementary scripts if [[ -d $HOME/.bashrc.d ]] ; then -- cgit v1.2.3