* Brian K. White
On 12/29/2010 4:45 PM, Patrick Shanahan wrote:
* Randall R Schulz
[12-29-10 16:36]: The "have: command not found" diagnostic occurs immediately after source-ing /etc/bash_completion.d/patool.sh. What's in that file on your system?
I reinstalled both bash-completion and patool w/o any relief.
here is /etc/bash_completion.d/patool.sh
# patool completion # have patool && {
Your next test upon finding this code here is to locate the command called "have"
"which have" "type have" "whereis have"
will probably return nothing, ie, "have" is neither a shell builtin, nor a defined alias, nor is there an executable in your $PATH named "have".
Either find some package that installs a program called "have" or find some .rc script that is supposed to define an alias named "have", or fix the garbage script here that assumes all boxes have a command or alias named "have".
in *this* case, have is a function provided by /etc/bash_completion: # This function checks whether we have a given program on the system. # No need for bulky functions in memory if we don't. # have() { unset -v have PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin type $1 &>/dev/null && have="yes" } which calls a ?subscript? in /etc/bash_completion.d/patool.sh that was quoted, re: your explanation of "have/which".
In fact, in this script, it appears "have" is supposed to do something like "which", "type", or "whereis" do.
You can just replace the word "have" above with the word "which".
Possibly this script was written for some other (non-suse) distribution that happens to define a "have" alias or function in it's shell rc scripts. Possibly on that distro, the "have" command does more than just look for the argument in $PATH like consult the package database maybe. But for you, for now, just try using "which", and only get fancier if it turns out to be necessary.
Or look for a correct opensuse package for patool which doesn't try to use commands that don't exist on opensuse.
08:17 wahoo:~ > rpm -q bash-completion patool bash-completion-1.1-6.1.noarch patool-0.12-2.1.noarch which were obtained from: http://download.opensuse.org/repositories/shells/openSUSE_11.2/ http://download.opensuse.org/repositories/Archiving/openSUSE_11.2/ a possible solution, removal of the script, /etc/bash_completions.d/patool.sh AND, I guess, a report to bugzilla?? But I still don't understand why I have the problem and others do not?? -- Patrick Shanahan Plainfield, Indiana, USA HOG # US1244711 http://wahoo.no-ip.org Photo Album: http://wahoo.no-ip.org/gallery2 Registered Linux User #207535 @ http://counter.li.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org