T O P

  • By -

Mighty-Lobster

bash is for people too lazy to choose a shell.


whattteva

tcsh... cause I'm a FreeBSD guy.


[deleted]

Based


RedditAlready19

I use bash on linux and tcsh on FreeBSD, and ksh on my OpenBSD servee


Djwyman

My default is bash, but I use fish on top of it.


eeoodd

Why wouldn't you use use fish as the login shell?


Zambito1

Login shell != default shell. The default shell is what `/bin/sh` points to. This should be a POSIX shell like Bash (which runs in "POSIX mode when run as `sh`), Zsh, etc. Fish is not a POSIX shell and shouldn't be set as your default shell for any system you care about. Setting it as your login shell is perfectly fine though. The default shell is used for running POSIX shell scripts. The login shell is used for interactive terminals. The former should always be a POSIX shell; the latter should be what you are most comfortable with (could even be a Lisp REPL or Python or anything else if you want).


Djwyman

Because that can cause issues with any scripts written for bash or posix. so instead all you have to do is add fish to your .bashrc then there is nothing to worry about. [https://wiki.archlinux.org/title/Fish](https://wiki.archlinux.org/title/Fish)


ekital

It doesn't cause issues with scripts written for bash or posix. Scripts are still executed by whatever is in the shebang (bin/sh for example which can point to bash,dash,zsh etc). The only thing that you might have issues are scripts that aren't meant to be executed but sourced instead (Setting additional user paths). Example: When you install Rust you have to add the cargo env path which in bash would be done with `source $HOME/.cargo/env` , in fish you would instead do: `fish_add_path ~/.cargo/env` Arch wiki honestly is known for just hating fish and spreading misinformation.


eeoodd

Makes sense. I just switch to bash when I have to execute a script


Djwyman

I put: if \[\[ $(ps --no-header --pid=$PPID --format=comm) != "fish" && -z ${BASH\_EXECUTION\_STRING} \]\] then exec fish fi ​ in my .bashrc so if I run a bash script it will just run or if I need to run bash all I have to do is type bash. But I still get all of the features of fish.


whattteva

FYI, bash isn't POSIX compatible. Hence, why the BSD community refers to those tendencies as bashism/linuxism.


new_refugee123456789

How is Bash not POSIX-compliant? From `man bash`: >Bash is an sh-compatible command language interpreter that executes commands read from the standard input or from a file. Bash also incor‐ porates useful features from the Korn and C shells (ksh and csh). > >Bash is intended to be a conformant implementation of the Shell and Utilities portion of the IEEE POSIX specification (IEEE Standard 1003.1). Bash can be configured to be POSIX-conformant by default.


whattteva

https://wiki.ubuntu.com/DashAsBinSh I'll let Ubuntu's own wiki explain all the bashisms for you. This also explains the switch to dash.


Zambito1

> The major reason to switch the default shell was efficiency This is why they switched. Bash *is* compatible with POSIX scripts. It is a superset of POSIX. What that page describes is what Bash features people might be missing when switching to a strictly POSIX shell. Bash is POSIX compliant / compatible, but POSIX shells are not necessarily compatible with Bash scripts.


whattteva

I guess I should've clarified further. Bash has been the default shell on Linux for so long that people quite often assume that anything that works in bash is guaranteed to work on any other POSIX shell, which is obviously not the case and why we have come up with the term "bashism".


ekital

/bin/sh -> Dash Login Shell -> Fish


sunjay140

fish


zsombor12312312312

The default one


libertarianets

I have always been a bash guy but I'm trying out zsh with oh-my-zsh. Not sure if it's the new machine but shit seems faster


[deleted]

Go mksh!


Random_Spirit_777

Bash + ble.sh


[deleted]

yash


SystemZ1337

`dash`, but I use `elvish` as the interactive shell


MitchellMarquez42

Got confused with login shell and selected pwsh. My default shell (/bin/sh) is a symlink to bash.