public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] bash completion for paths not working
@ 2005-10-23 16:53 Mark Knecht
  2005-10-24 12:48 ` Holly Bostick
  0 siblings, 1 reply; 6+ messages in thread
From: Mark Knecht @ 2005-10-23 16:53 UTC (permalink / raw
  To: gentoo-user

Hi,
   On one machine of mine, and only one machine, bash completion is
not working for my user account when I try to complete a path. I hit
tab and nothing happens. Bash completion is working for files though.
I can do bash completion in my home directory and get a list of files,
but if I try to complete /usr/sr  but hitting a tab it just sits and
does nothing.

   It works fine for root.

   What turns this feature on for a user? I copied a good .bashrc file
from a working machine over and logged back into the bad machine but
that didn't fix it.

   man bash makes it look like it should be on by default.

  Thanks for the unix lesson.

Cheers,
Mark

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-user] bash completion for paths not working
  2005-10-23 16:53 [gentoo-user] bash completion for paths not working Mark Knecht
@ 2005-10-24 12:48 ` Holly Bostick
  2005-10-24 17:50   ` Mark Knecht
  0 siblings, 1 reply; 6+ messages in thread
From: Holly Bostick @ 2005-10-24 12:48 UTC (permalink / raw
  To: gentoo-user

Mark Knecht schreef:
> Hi, On one machine of mine, and only one machine, bash completion is 
> not working for my user account when I try to complete a path. I hit 
> tab and nothing happens. Bash completion is working for files though.
> I can do bash completion in my home directory and get a list of
> files, but if I try to complete /usr/sr  but hitting a tab it just 
> sits and does nothing.
> 
> It works fine for root.
> 
> What turns this feature on for a user? I copied a good .bashrc file 
> from a working machine over and logged back into the bad machine but 
> that didn't fix it.
> 
> man bash makes it look like it should be on by default.
> 
> Thanks for the unix lesson.
> 
> Cheers, Mark

Yes, I have a similar problem, but bash-completion doesn't work
correctly for anybody (user or su root).

I uncommented the bash completion command in both ~/.bashrcs long ago,
and at first the problem was only for root (which was weird enough); now
(what constitutes 'now' as opposed to 'previously' I don't know) if I
hit tab when filling in a path or a filename, as you said, nothing
happens; if I fill in the rest of the path manually, the file is not
found-- because my use of the TAB key has invisibly taken me up one
directory (where the file does not exist). When I hit enter, I find that
if I had started in /usr/local/src, I am now in /usr/local, for example.

This occurs under various terminals (aterm, gnome-terminal,
multi-gnome-terminal, xterm), although bash-completion fails differently
under each of them (which is also weird). I know something has changed,
but not what.

Although.... now that I'm looking into this (which I had not really
taken time to do, so I wasn't really 'worrying' about it as I had put
this annoyance on my secondary 'to-do/fix' list, despite the fact that
it's a major annoyance) I notice that I have both bash-completion and
bash-completion-config installed-- and the man
page for bash-completion-config says that the config files are in
/etc/bashcomp-configrc, if it exists, or $HOME/.bashcomp-configrc, if it
exists.

So at least I probably need to check there first to see if
bash-completion has in fact been set, since there is no mention of
~/.bashrc and perhaps those settings are now invalid, or in conflict.

Something for you to check as well, Mark?

Holly
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-user] bash completion for paths not working
  2005-10-24 12:48 ` Holly Bostick
@ 2005-10-24 17:50   ` Mark Knecht
  2005-10-24 17:57     ` Billy Holmes
  0 siblings, 1 reply; 6+ messages in thread
From: Mark Knecht @ 2005-10-24 17:50 UTC (permalink / raw
  To: gentoo-user

On 10/24/05, Holly Bostick <motub@planet.nl> wrote:
> Mark Knecht schreef:
> > Hi, On one machine of mine, and only one machine, bash completion is
> > not working for my user account when I try to complete a path. I hit
> > tab and nothing happens. Bash completion is working for files though.
> > I can do bash completion in my home directory and get a list of
> > files, but if I try to complete /usr/sr  but hitting a tab it just
> > sits and does nothing.
> >
> > It works fine for root.
> >
> > What turns this feature on for a user? I copied a good .bashrc file
> > from a working machine over and logged back into the bad machine but
> > that didn't fix it.
> >
> > man bash makes it look like it should be on by default.
> >
> > Thanks for the unix lesson.
> >
> > Cheers, Mark
>
> Yes, I have a similar problem, but bash-completion doesn't work
> correctly for anybody (user or su root).
>
> I uncommented the bash completion command in both ~/.bashrcs long ago,
> and at first the problem was only for root (which was weird enough); now
> (what constitutes 'now' as opposed to 'previously' I don't know) if I
> hit tab when filling in a path or a filename, as you said, nothing
> happens; if I fill in the rest of the path manually, the file is not
> found-- because my use of the TAB key has invisibly taken me up one
> directory (where the file does not exist). When I hit enter, I find that
> if I had started in /usr/local/src, I am now in /usr/local, for example.
>
> This occurs under various terminals (aterm, gnome-terminal,
> multi-gnome-terminal, xterm), although bash-completion fails differently
> under each of them (which is also weird). I know something has changed,
> but not what.
>
> Although.... now that I'm looking into this (which I had not really
> taken time to do, so I wasn't really 'worrying' about it as I had put
> this annoyance on my secondary 'to-do/fix' list, despite the fact that
> it's a major annoyance) I notice that I have both bash-completion and
> bash-completion-config installed-- and the man
> page for bash-completion-config says that the config files are in
> /etc/bashcomp-configrc, if it exists, or $HOME/.bashcomp-configrc, if it
> exists.
>
> So at least I probably need to check there first to see if
> bash-completion has in fact been set, since there is no mention of
> ~/.bashrc and perhaps those settings are now invalid, or in conflict.
>
> Something for you to check as well, Mark?
>
> Holly

Holly,
   Interesting, but somewhat different than mine. What I'm finding
this morning is that as a user it will complete some paths. For
instance here is completes for a path in my directory:

mark@gigastudio ~ $ pwd
/home/mark
mark@gigastudio ~ $ ls CODE/
xfst-0.4  xfst-0.4.tar.gz
mark@gigastudio ~ $ cd CODE/xfst-0.4/
Makefile         fst.o            install-sh       vst/             xfst
README           fstconfig.c      jackvst.h        vsti.c           xfst.exe.so
audiomaster.c    fstinfofile.c    jfst.c           vsti.o
audiomaster.o    fstinfofile.o    jfst.o           vstinfo.c
fst.c            gtk.c            readme.jack-fst  vstwin.c
fst.h            gtk.o            tags             vstwin.o
mark@gigastudio ~ $ cd CODE/xfst-0.4/vst
vst/       vsti.c     vsti.o     vstinfo.c  vstwin.c   vstwin.o
mark@gigastudio ~ $ cd CODE/xfst-0.4/vst
mark@gigastudio ~/CODE/xfst-0.4/vst $ pwd
/home/mark/CODE/xfst-0.4/vst
mark@gigastudio ~/CODE/xfst-0.4/vst $

and for a file:

mark@gigastudio ~ $ pwd
/home/mark
mark@gigastudio ~ $ ls CODE/xfst-0.4/
Makefile         fst.o            install-sh       vst/             xfst
README           fstconfig.c      jackvst.h        vsti.c           xfst.exe.so
audiomaster.c    fstinfofile.c    jfst.c           vsti.o
audiomaster.o    fstinfofile.o    jfst.o           vstinfo.c
fst.c            gtk.c            readme.jack-fst  vstwin.c
fst.h            gtk.o            tags             vstwin.o
mark@gigastudio ~ $ ls CODE/xfst-0.4/vst
vst/       vsti.c     vsti.o     vstinfo.c  vstwin.c   vstwin.o
mark@gigastudio ~ $ ls CODE/xfst-0.4/vstinfo.c
CODE/xfst-0.4/vstinfo.c
mark@gigastudio ~ $

It works for hidden direcotries and files:

mark@gigastudio ~ $ cd .wine/
dosdevices/  drive_c/     system.reg   user.reg     userdef.reg
mark@gigastudio ~ $ cd .wine/drive_c/
My Documents/  Program Files/ windows/
mark@gigastudio ~ $ cd .wine/drive_c/windows/
Application Data/ fonts/            regedit.exe       system32/       
 winebrowser.exe
Start Menu/       inf/              rundll32.exe      temp/           
 winhelp.exe
_isenv31.ini      notepad.exe       system/           uninstall.exe   
 winhlp32.exe
command/          profiles/         system.ini        win.ini
mark@gigastudio ~ $ cd .wine/drive_c/windows/


However it will not complete for /usr, /bin or /var:

mark@gigastudio ~ $ ls /us
mark@gigastudio ~ $ ls /bi
mark@gigastudio ~ $ ls /var

This seems almost like a permissions issue. However I can cd /usr/src,
I just cannot bash complete it:

mark@gigastudio ~ $ cd /usr/src
mark@gigastudio /usr/src $ ls
linux                    linux-2.6.12-gentoo-r6  linux-2.6.14-rc5-rt5
linux-2.6.12-gentoo-r10  linux-2.6.13-gentoo-r3  patches
mark@gigastudio /usr/src $

And indeed, I just found this item:

mark@gigastudio / $ ls -la
ls: .: Permission denied
mark@gigastudio / $


But I do not see what's wrong yet:

gigastudio / # ls -la
total 76
d-wxr----t  18 root root  4096 Sep  6 12:46 .
d-wxr----t  18 root root  4096 Sep  6 12:46 ..
-rw-------   1 root root  1437 Sep  7 04:53 .bash_history
drwxr-xr-x   2 root root  4096 Sep  7 08:09 bin
drwxr-xr-x   2 root root  4096 Sep  7 08:06 boot
drwxr-xr-x  14 root root 13520 Oct 24 08:53 dev
drwxr-xr-x  54 root root  4096 Oct 24 08:53 etc
drwxr-xr-x   4 root root  4096 Sep  8 01:10 home
drwxr-xr-x   9 root root  4096 Oct 22 08:18 lib
drwx------   2 root root 16384 Sep  6 08:49 lost+found
drwxr-xr-x   5 root root  4096 Sep  8 09:34 mnt
drwxr-xr-x   2 root root  4096 Jul 26 10:11 opt
dr-xr-xr-x  88 root root     0 Oct 24 08:53 proc
drwx------  11 root root  4096 Oct 23 14:17 root
drwxr-xr-x   2 root root  4096 Oct 22 09:25 sbin
drwxr-xr-x  10 root root     0 Oct 24 08:53 sys
drwxrwxrwt  13 root root  4096 Oct 24 10:26 tmp
drwxr-xr-x  16 root root  4096 Oct 23 14:01 usr
drwxr-xr-x  13 root root  4096 Sep  8 03:08 var
gigastudio / #

gigastudio / # cat /etc/group | grep mark
wheel:x:10:root,mark
audio:x:18:mark
video:x:27:root,mark
games:x:35:mark
users:x:100:games,mark
realtime:x:600:mark
gigastudio / #

I do not seem to have any packages installed for this, as best I can
tell so far. I do nothave the same /etc files as you:

gigastudio / # ls -la /etc/bash*
total 16
drwxr-xr-x   2 root root 4096 Oct 24 10:40 .
drwxr-xr-x  54 root root 4096 Oct 24 08:53 ..
-rw-r--r--   1 root root  132 Jul 30 04:06 bash_logout
-rw-r--r--   1 root root 1627 Jul 30 04:06 bashrc
gigastudio / #

Strange problems!

Thanks,
Mark



I do not see the issue (yet) where I end up one directory higher. I'll
keep an eye out for that.

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-user] bash completion for paths not working
  2005-10-24 17:50   ` Mark Knecht
@ 2005-10-24 17:57     ` Billy Holmes
  2005-10-24 18:06       ` Mark Knecht
  0 siblings, 1 reply; 6+ messages in thread
From: Billy Holmes @ 2005-10-24 17:57 UTC (permalink / raw
  To: gentoo-user

Mark Knecht wrote:
> d-wxr----t  18 root root  4096 Sep  6 12:46 .
> d-wxr----t  18 root root  4096 Sep  6 12:46 ..

your root directory should NOT have these perms.

try:

# chmod 0755 /

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-user] bash completion for paths not working
  2005-10-24 17:57     ` Billy Holmes
@ 2005-10-24 18:06       ` Mark Knecht
  2005-10-24 18:28         ` Billy Holmes
  0 siblings, 1 reply; 6+ messages in thread
From: Mark Knecht @ 2005-10-24 18:06 UTC (permalink / raw
  To: gentoo-user

On 10/24/05, Billy Holmes <billy@gonoph.net> wrote:
> Mark Knecht wrote:
> > d-wxr----t  18 root root  4096 Sep  6 12:46 .
> > d-wxr----t  18 root root  4096 Sep  6 12:46 ..
>
> your root directory should NOT have these perms.
>
> try:
>
> # chmod 0755 /
>

Thanks Billy. That appears to have solved my issue.

I wonder how it ever got that way? I don't know what a trailing 't'
even means, much less put it there on purpose!

Anyway, thanks!

- Mark

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-user] bash completion for paths not working
  2005-10-24 18:06       ` Mark Knecht
@ 2005-10-24 18:28         ` Billy Holmes
  0 siblings, 0 replies; 6+ messages in thread
From: Billy Holmes @ 2005-10-24 18:28 UTC (permalink / raw
  To: gentoo-user

Mark Knecht wrote:
> I wonder how it ever got that way? I don't know what a trailing 't'
> even means, much less put it there on purpose!

Well, you have been tinkering with things lately. It's possible you ran 
an funky install script that had a space between a pathname "/ var/tmp".

To be safe, try installing one of the root kit checkers in portage and 
scan your system.
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-10-24 18:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-23 16:53 [gentoo-user] bash completion for paths not working Mark Knecht
2005-10-24 12:48 ` Holly Bostick
2005-10-24 17:50   ` Mark Knecht
2005-10-24 17:57     ` Billy Holmes
2005-10-24 18:06       ` Mark Knecht
2005-10-24 18:28         ` Billy Holmes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox