5 ms·
Seeing this release makes me cringe. I've used Bash as an interactive shell for decades but really I'm sick and tired of it. As a scripting language, I loathe
by wicket 8y ago
Seeing this release makes me cringe. I've used Bash as an interactive shell for decades but really I'm sick and tired of it.
As a scripting language, I loathe it and really don't understand its purpose. I always write shell scripts in POSIX shell for portability reasons. Most of the time I don't need to use any of Bash's features. In cases where advanced features are needed and portability is not a concern, there are other scripting languages much better suited for this (Python, Ruby, etc).
As an interactive shell, the only features I ever use are command history and tab completion. Bash is way too bloated for my use case (it's only a matter of time before the next Shellshock is discovered). Other lightweight shells are missing the couple of interactive features which I do use.
If anyone knows of a shell which meets my criteria of being lightweight but with command history and tab completion (paths, command names and command arguments), I'd really appreciate any suggestions. Otherwise I may have to look into extending dash or something.
- manquer 8y agozsh has much better tab completion, you should check it out
- AegisCZ 8y agoEven more bloated
- p4bl0 8y agoI read that often but I don't understand how it can be true. Bash (and I suppose zsh's) tab-completion is programmable so you can make it do whatever you want to.
- TylerE 8y agoZsh, especially with an addon package like oh-my-zsh isn't just programmable but is actually programmed. Like, it just works, near magically - for instance make <tab> looks for the Makefile in the current dir and actually scrapes the targets from it.
- p4bl0 8y agoAFAIK Bash does that by default too (at least it's been the case on my Debian setups for years). It also works with git for example, not just with its subcommands but also with your commits, tags, branches, remotes, etc. Many Debian packages comes with a completion script for Bash so you get it when you install them :).
- Hello71 8y agozsh completion supports menus, typo correction, caching...
- p4bl0 8y agoOh okay, thanks.
- maxfurman 8y agoI've used fish for a few years now and am a big fan. I'm not sure if it meets your definition of lightweight but tab completion works very well out of the box.
- liveoneggs 8y agoksh
- acdha 8y agoI recently switched to fish and was quite happy with how little effort it took: chsh, use fish_config to pick a prompt with Git status, and that's it.
- anbotero 8y agoI switched to fish around 2010-2011, and I have never looked back. I’ve never had to set anything else besides my personal functions. These days it’s even faster and much more stable, and I’ve had so much more practice that I know all keyboard shortcuts and understand a lot of its inner workings.
- Twirrim 8y agoIf you're on Ubuntu, you could switch to dash. It's installed by default, and /bin/sh symlinks to it.
- wicket 8y agoThanks for all the suggestions. Unfortunately zsh and fish are more bloated than bash, and dash and ksh are missing the features I use. I've just found "yash" which looks like a nice compromise. I'm going to give that a try.
- xnyan 8y agoIf I may humbly ask, what is your definition of bloated? Bloated in technical sense that the software does not operate within your determined hardware constraints (valid!) or the philosophical sense that it has more features than your needs (also valid of course)?
- wicket 8y agoMy definition aligns with both definitions you described. Although I don't really have any hardware constraints that would stop me from running bash, zsh or fish, so my reasons for not wanting to use them, probably align better with your second definition. However, I wouldn't consider the second definition to be philosophical, but technical. It has more features than my needs, therefore it has more lines of code, potentially more bugs, uses more memory and has a greater attack surface.
- skywhopper 8y agoOkay... no one is making you use Bash. I use it a lot, depend on its features, and I'm glad they are still improving it. I agree it has lots of warts from retaining so much backwards compatibility, but for certain use cases it's still much easier to write (and read) than any "real" programming language, including stuff like Python and Ruby. Since you don't need to deal with those use cases, that's cool. Not sure why you came here to trash it, though.
- roryrjb 8y ago"If anyone knows of a shell which meets my criteria of being lightweight but with command history and tab completion (paths, command names and command arguments), I'd really appreciate any suggestions. Otherwise I may have to look into extending dash or something." I would also love to know the answer to this question. I am a big fan of shells and shell programming in general and POSIX shell in particular. Only suggestion I currently have is ksh, of which there are a few implementations, ksh93 still developed (https://github.com/att/ast https://github.com/att/ast), pdksh from OpenBSD (of which there is a portable version here: https://github.com/ibara/oksh https://github.com/ibara/oksh) and MirBSD ksh (https://www.mirbsd.org/mksh.htm https://www.mirbsd.org/mksh.htm). Otherwise of interest is mrsh: https://github.com/emersion/mrsh https://github.com/emersion/mrsh which was recently mentioned by Drew DeVault in a blog post linked here: https://news.ycombinator.com/item?id=18777909 https://news.ycombinator.com/item?id=18777909. EDIT: And by mentioning mrsh, I meant it as a better/easier base to extend to get what you are asking for.
- ed_elliott_asc 8y agoDon’t hate me for saying this but try powershell or pwsh
- nivenhuh 8y agoI think tcsh might hit your requirements. (Personally, I use zsh, but it's much more heavy than tcsh.)