[Hackage] #676: bash-completion gets confused by alias for rm

Hackage cvs-ghc at haskell.org
Sun May 2 18:10:28 EDT 2010

#676: bash-completion gets confused by alias for rm
  Reporter:  benmachine          |        Owner:        
      Type:  defect              |       Status:  new   
  Priority:  normal              |    Milestone:        
 Component:  cabal-install tool  |      Version:  HEAD  
  Severity:  minor               |     Keywords:        
Difficulty:  unknown             |   Ghcversion:  6.12.1
  Platform:  Linux               |  
 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 at euler ~]$ cabal install hasbash: bad substitution: no closing "`" in

 It turns out that rm is helpfully going:

 removed `/tmp/cabal_completion.hb1zbc'

 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

Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/676>
Hackage <http://haskell.org/cabal/>
Hackage: Cabal and related projects

More information about the cabal-devel mailing list