Hacker News new | past | comments | ask | show | jobs | submit login

Few minor corrections as several posts in this thread suggest outright installing bash just to achieve tab completion in FreeBSD.

The default root shell on FreeBSD is csh (tcsh) [1] and has been that way for at least 21 years (at least if I read the revision history [2] correctly, my own memories only go back about some 15 years).

As per Wikipedia article, tcsh natively supports tab completion since about 1983 [3] (which I can confirm always worked without an issue as far as my memories go, so again, give or take 15 years).

Permanently switching any user shell to tcsh (if it happens to be sh) is pretty much a single `chsh` command away, so as far as strictly tab completion goes, manual installation of bash is not required at all.

The required steps (step) to setup tcsh for tab completion can be found i.e. in this 2004 FAQ [4]:

Tip#7: List possible completions

I often see Bash users complain that Tcsh does not give a list of completions with the tab key. This is not true. Not only can Tcsh list complentions, but it can do it in color. Just add this to your ~/.tcshrc

set autolist set color set colorcat

[1] https://www.freebsd.org/doc/en/articles/linux-users/shells.h...

[2] https://svnweb.freebsd.org/base/head/etc/master.passwd

[3] https://en.wikipedia.org/wiki/Tcsh

[4] http://www.tcsh.org/TipsAndTricks




+1 I'm confused as to why so many people are saying that FreeBSD doesn't autocomplete when it always has.

Also want to add that csh comes stock with historical auto completion which I very much enjoy.

Typing "tail " and pushing the up arrow will auto complete with the last command you typed starting with "tail ".


...and /bin/sh has tab completion anyway (set -o emacs)!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: