Turn on AutoComplete for Filesystem ?

Hello All,

Im not sure if its called auto-complete or not. But on my other freebsd systems, when Im browsing the filesystem I'am able to hit tab and it will finish the filesystem path for me, and if I hit tab twice it will display all the possible choices.

This system I just installed does not have that feature or I did not configure the system correctly.

What is this feature called ? and how to install or reconfigure it ?

Thanks for the help
 
Actually, I can use this feature for the root account and when in super user mode, but not while using a regular user
 
Which shell are you using? Unless I'm mistaken, tcsh and bash will default to doing that.

If not, have you tried putting the following into your .cshrc?
set filec
 
Replying to the first post:

Well, in zsh, I just tested it and it works. However, I put
so many options in the .zshrc (left them there, that is,
they were already written on the web) that I could not know
offhand which one it is. You'd probably want to find out what
shell you are using, browse a few rc's (tscrc, cshrc or...)
and maybe one is commented enough...
 
chsh and choose /bin/csh.
Add set autolist to ~/.cshrc .
Code:
	# An interactive shell -- set some stuff up
	set prompt='$'
	set autolist
        set filec
	set history = 100
	set savehist = 100
	set mail = (/var/mail/$USER)
	if ( $?tcsh ) then
		bindkey "^W" backward-delete-word
		bindkey -k up history-search-backward
		bindkey -k down history-search-forward
	endif
endif
You practically won't ever need bash.
 
I was using the sh shell, I was able to chsh and change the shell to csh.

I dont see the code posted below though, but after a relogin it appears to be working

Bunyan said:
chsh and choose /bin/csh.
Add set autolist to ~/.cshrc .
Code:
	# An interactive shell -- set some stuff up
	set prompt='$'
	set autolist
        set filec
	set history = 100
	set savehist = 100
	set mail = (/var/mail/$USER)
	if ( $?tcsh ) then
		bindkey "^W" backward-delete-word
		bindkey -k up history-search-backward
		bindkey -k down history-search-forward
	endif
endif
You practically won't ever need bash.
 
Or you can begin typing, then press Ctrl+D. It works on csh.

And BTW, you can choose csh automatically when you manually create a new user using # adduser.
 
Of course, you have to logout and login again for the changes to take effect. How could I forget to mention?
 
Bunyan said:
Of course, you have to logout and login again for the changes to take effect. How could I forget to mention?

This will also do the trick if you are already logged in:
$ source ~/.cshrc
 
Back
Top