Our great sponsors
-
ohmyzsh
🙃 A delightful community-driven (with 2,300+ contributors) framework for managing your zsh configuration. Includes 300+ optional plugins (rails, git, macOS, hub, docker, homebrew, node, php, python, etc), 140+ themes to spice up your morning, and an auto-update tool so that makes it easy to keep up with the latest updates from the community.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
bash-timestamping-sqlite
bash commandline timestamping using a sqlite database for personal analytics, activity logging and auditing
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
zinit
Discontinued Flexible and fast Zsh plugin manager with clean fpath, reports, completion management, Turbo, annexes, services, packages.
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
`fish` is amazing. I used to have a big old dotfiles repo, but nowadays I add starship[0] to my env and I'm pretty much good to go.
On the non-interactive scripting front, I've found fish to be a very competent language for it, but you're right, the error handling (among other things) are lacking compared to "real" languages
[0]: https://starship.rs
One still needs oh-my-fish, as one needs oh-my-zsh. So the setup time is 100% equal for fish and zsh.
One still needs oh-my-fish, as one needs oh-my-zsh. So the setup time is 100% equal for fish and zsh.
> I believe that using zsh means, for the vast majority of users, using just a small subset of functionality that gives a better UX when compared to Bash.
What about adding only these functionalities you may care about?
When I tried zsh, what I liked was the history search. Like youm Everything else "wasn't as simple as I expected".
So I fixed my bash. Check https://github.com/csdvrx/bash-timestamping-sqlite :
- stores everything into a sqlite database so 2 separate terminals can access each other history on the go
- add extras details to the history like when the command started, stopped, which with return code, in which directory,
- for accessing the history, uses fzy for fuzzy finding,
- provides 2 separate history search context: either global (ctrl-t) or "this directory only" (ctrl-r), with extra goodies like excluding commands with a non-zero return error code thanks to the extra things saved
I included a few examples of the SQL queries you can run.
> But zsh doesn't even use readline, which is bananas to me. Sure, provide an alternative but at least support readline.
Why? ZLE is what makes zsh compelling for users. It provides a high level of customizability into command line editing that is simply not possible with bash. It powers zsh's most touted completion feature as well as popular plugins such as zsh-syntax-highlighting[1] and zsh-autosuggestions[2]. Replacing it with readline would be a sure way to lose a majority of users in a blink of an eye.
> But zsh doesn't even use readline, which is bananas to me. Sure, provide an alternative but at least support readline.
Why? ZLE is what makes zsh compelling for users. It provides a high level of customizability into command line editing that is simply not possible with bash. It powers zsh's most touted completion feature as well as popular plugins such as zsh-syntax-highlighting[1] and zsh-autosuggestions[2]. Replacing it with readline would be a sure way to lose a majority of users in a blink of an eye.
https://github.com/romkatv/powerlevel10k claims to do this (and other things) while remaining extremely fast (apparently the dev was aiming to keep it below the threshold of human perception; not 100% sure that extends to all features or not)
Yes it is incredibly heavyweight, but it's very batteries-included in its approach, which helps zsh newbies get started.
For those who want to shed the heavyweight omz stuff, I recommend zplug [0]
Not really what you're asking for, but a language that compiles to bash for portability reminded me of Batsh [0], a C-like language that compiles to bash for Linux/Mac and batch for Windows.
For folks who use nvm and find it slow, try out Volta[1]. It’s much faster, and IMO a lot nicer to use in general.
I switched to fish for about six months, and recently went back to zsh when I realised that the three things I really liked about it (abbreviations, syntax highlighting and autosuggestions) were all doable in zsh with extensions [0]. (It feels pretty slow, even slower than say OMZ, but that's not such a big deal for me.)
[0] https://github.com/olets/zsh-abbr
The first thing in install with oh-my-fish is bang-bang, which fixes this issue for me.
Or zgenom[0]. Or if you want to get ESPECIALLY froggy and async with your shell startup, zinit[1]. I ran zinit for years before moving to zgenom. A large swath of electron apps use some weird NPM library to “resolve” your shell environment by kicking up a full interactive shell and then reading the environment variables out of it. zinit messed with that and would hang a lot because of all it’s async loading.
I have to say, I use fish and I customize my prompt... is starship really necessary? I recognize starship is cross-shell, but if I standardize on installing fish on my machines, I'm not sure I need that feature.
Is there a "killer app" for starship that you can't get from writing out your prompt in a fish shell script?
Here's mine: https://github.com/maximum-ethics/linode-caddy/blob/master/r...
It's a 3-line prompt with a timestamp on the first line, my username@host + pwd on the 2nd line, and the actual prompt with the cursor on the 3rd line. I'm now considering swapping the timestamp to the right side after that possibility was mentioned in other comments in this thread.
OK I actually looked it up (why not, I'm bored right now).
It seems like it loads functions like sin, cos, ln and so on, but mainly it's a shortcut to make the scale larger [1].
How would you normally do it? Because you can still put redefinitions of all the standard functions into a single file and load them with `.` as you would with other shells.
There's also this package, which the author admits only allows "slight" customization, to implement sessions: https://github.com/farzadghanei/fishion