Bugs item #313502, was changed at 2012-01-11 04:15 by Sung Pae You can respond by visiting: https://alioth.debian.org/tracker/?func=detail&atid=413095&aid=313502&group_id=100114
Status: Open Priority: 3 Submitted By: Sung Pae (guns-guest) Assigned to: Nobody (None) Summary: [PATCH] Workaround bash bug that fails to complete <, > Distribution: --Distribution-Agnostic-- Originally reported in: None Milestone: None Status: None 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: Sung Pae (guns-guest) Date: 2012-01-17 16: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 _______________________________________________ Bash-completion-devel mailing list Bash-completion-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/bash-completion-devel