easygit (aka eg) fails with "unary operator expected"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
easygit (Ubuntu) |
Incomplete
|
Undecided
|
Unassigned |
Bug Description
Writing:
"$ eg rm "
then pressing tab will result in:
"$ eg rm bash: [: 1: unary operator expected"
Completion fails with other easygit subcommands as well.
$ lsb_release -rd
Description: Ubuntu 13.04
Release: 13.04
$ apt-cache policy bash-completion
bash-completion:
Installed: 1:2.0-1ubuntu3
Candidate: 1:2.0-1ubuntu3
Version table:
*** 1:2.0-1ubuntu3 0
500 http://
100 /var/lib/
$ apt-cache policy easygit
easygit:
Installed: 0.99-1
Candidate: 0.99-1
Version table:
*** 0.99-1 0
500 http://
100 /var/lib/
description: | updated |
description: | updated |
I don't have eg installed, but I got the completions from the .deb, and sourced them in a shell.
Works for me on Trusty; I don't see those error messages. I am using git from the ppa, though: 2:2.1.3- 1avh1~trusty1 not Trusty's 1:1.9.1-1. (eg uses git's completion functions, and /usr/share/ bash-completion /completions/ git is provided by git).
Are you doing this in a directory with any funny names in it? maybe files with a * in their name?
Another thing that can cause problems is old cruft hanging around in /etc/bash_ completion. d, overriding the good versions of functions supplied by new stuff.
Anyway, eg provides /etc/bash_ completion. d/eg, so this is eg's bug, or a bug in interaction between it and whatever version of git completion you have installed. git's completion file is actually really massive, and has modified and renamed versions of some of the building block functions that that bash-completion ships.
Please confirm this still happens on a Trusty or later system.