Mailinglist Archive: opensuse (882 mails)

< Previous Next >
Re: [opensuse] bash trouble ??profile
  • From: "Brian K. White" <brian@xxxxxxxxx>
  • Date: Thu, 30 Dec 2010 02:15:58 -0500
  • Message-id: <4D1C31AE.40903@xxxxxxxxx>
On 12/29/2010 4:45 PM, Patrick Shanahan wrote:
* Randall R Schulz<rschulz@xxxxxxxxx> [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 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.

--
bkw


_patool()
{
local cur prev commands options command

COMPREPLY=()
cur=`_get_cword`

commands='extract list test create diff repack formats'

if [[ $COMP_CWORD -eq 1 ]] ; then
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '--help' -- $cur ) )
else
COMPREPLY=( $( compgen -W "$commands" -- $cur ) )
fi
else

command=${COMP_WORDS[1]}

if [[ "$cur" == -* ]]; then
# possible options for the command
options=''
case $command in
extract|list|test|create)
options='--verbose'
;;
esac
options="$options --help"

COMPREPLY=( $( compgen -W "$options" -- $cur ) )
else
_filedir
fi
fi

return 0
}
complete -F _patool $filenames patool

}



I just understand enough to get into trouble :^)
tks

--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups