[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bash command completion



On Wed, 2016-07-06 at 14:29 -0600, Charlie Kravetz wrote:
> On Wed, 6 Jul 2016 13:48:24 -0600
> Glenn English <ghe@slsware.net> wrote:
> 
> > 
> > I put wheezy on a 386 computer last night ('aptitude dist-upgrade'
> > from squeeze -- it'd been in the junk box for a while), and when I
> > hit tab, bash just gives me a tab -- I have to type the whole
> > command manually. This happens only for the user; root works fine.
> > 
> > I've copied the .* scripts (the ones that looked relevant to me,
> > anyway) from /root and from a user directory on one of the (wheezy)
> > servers, and accomplished nothing. 
> > 
> > I looked at the scripts in /etc, but saw nothing that looked
> > promising -- there was some talk about bash-completion, but I could
> > see nothing in those scripts about a difference between user and
> > root.
> > 
> > A solution or a link to a solution would be much appreciated. 
> > 
> There should be a set of commands towards the bottom
> of /etc/bash.bashrc to enable completion. The commands are:
> 
> # enable bash completion in interactive shells
> #if ! shopt -oq posix; then
> #  if [ -f /usr/share/bash-completion/bash_completion ]; then
> #    . /usr/share/bash-completion/bash_completion
> #  elif [ -f /etc/bash_completion ]; then
> #    . /etc/bash_completion
> #  fi
> #fi

That's for the bash-completion package.

A normal bash shell should give completion for anything in PATH without
it, and it sounds like even this doesn't work for the OP?

Are you sure that your user uses bash for the login shell? There was a
transition from bash to dash some releases ago.

-- 
Cheers,
Sven Arvidsson
http://www.whiz.se

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: