[Bash-completion-devel] [bash-completion-Bugs][313502] [PATCH] Workaround bash bug that fails to complete <, >
bash-completion-bugs at alioth.debian.org
bash-completion-bugs at alioth.debian.org
Wed Jan 18 21:44:32 UTC 2012
Bugs item #313502, was changed at 2012-01-11 12:15 by Ville Skyttä
You can respond by visiting:
https://alioth.debian.org/tracker/?func=detail&atid=413095&aid=313502&group_id=100114
>Status: Closed
Priority: 3
Submitted By: Sung Pae (guns-guest)
>Assigned to: Ville Skyttä (scop-guest)
Summary: [PATCH] Workaround bash bug that fails to complete <, >
Distribution: --Distribution-Agnostic--
Originally reported in: None
Milestone: None
>Status: Fix Committed
Original bug number:
Initial Comment:
There is a bug in bash that causes completions of some of the
redirection operators to fail if a default completion function is
defined.
The details are in the following bug-bash mailing list message, but put
simply, when completing a command line "> ", bash mistakenly searches
the completions table for an empty string, and failing that, sends
the default completion function not an empty string, but the actual
redirection operator '>' as the first argument.
http://lists.gnu.org/archive/html/bug-bash/2012-01/msg00045.html
This is quite simply worked around for the moment by defining the
_minimal completion for the empty string. This allows filename
completion for people who like to:
$ > cats.txt # Truncate files quickly
$ >> cats.txt # Use redirection as a quick 'touch'
$ < cats.txt cat # Use redirection at the beginning of the
# command line
Given the slow bash upgrade cycle for various operating systems, a
workaround for this issue will be necessary for a long time.
----------------------------------------------------------------------
>Comment By: Ville Skyttä (scop-guest)
Date: 2012-01-18 23:44
Message:
Applied, thanks.
----------------------------------------------------------------------
Comment By: Sung Pae (guns-guest)
Date: 2012-01-18 00:40
Message:
Chet Ramey has acknoweldged this is a corner case of the completion
system, and will be addressed in the next release.
http://lists.gnu.org/archive/html/bug-bash/2012-01/msg00065.html
This workaround would still be necessary for all supported bash versions
to the current date.
----------------------------------------------------------------------
You can respond by visiting:
https://alioth.debian.org/tracker/?func=detail&atid=413095&aid=313502&group_id=100114
More information about the Bash-completion-devel
mailing list