Ticket #676 (closed defect: fixed)
bash-completion gets confused by alias for rm
|Reported by:||benmachine||Owned by:|
I have an alias for rm defined so that it is by default verbose (alias rm='rm -v' in my bashrc). When I do
cabal install has<tab>
I get something like:
[ben@euler ~]$ cabal install hasbash: bad substitution: no closing "" in /tmp/cabal_completion.tD2o8O'
It turns out that rm is helpfully going:
and then cabal is trying to use this as part of the completion command - choking on the ` because bash thinks it is part of a substitution.
So rm should probably explicitly discard its stdout.
While I was there I noticed that "cat" is used redundantly. There's nothing really wrong with this so that part of the patch can be cut I suppose, but I thought it was neater to use bash's input redirection explicitly.