Earlier quoted context omitted.
Another issue with zsh plugins is that they are incredibly slow. Oh-my-zsh makes every terminal feel like it’s running on another machine over ssh
this is probably the git plugin doing a "git status" or similar. Check the "plugins" array in .zshrc
The fish shell is amazing
281–290 of 302 posts
Re: The fish shell is amazing
#282Earlier quoted context omitted.
I moved from bash => zsh => fish. I wanted reasonable features on my shell, and fish was much faster and needed almost no plugins. The fact that I can write a simple for loop without needing to look up how to do it by far beats the POSIX compatibility, if I need it I can still write a bash script, but when using the shell I don't need to recall where semicolons or `do`, brackets (and how many) go.
Is it that hard to remember a bash for loop? for i in $(seq 1 10) do echo $i done Then you can just replace new lines with ; if writing a one liner. for i in $(seq 1 10); do echo $i; done I guess it isn't as simple as python for i in range(10): print(i) but it's pretty close aside from the variable binding.
Re: The fish shell is amazing
#283Earlier quoted context omitted.
What did you prefer about nu?
Working with tables of data feels more right, more like programming then the usual shell. I also work quite often with CSV and it's nice to be able to manipulate/filter it like any other data that nu is able to read (just: open file.csv | find "foobar" | select name message).
Re: The fish shell is amazing
#284Earlier quoted context omitted.
I don't get why people expect POSIX compliance from fish. Your interactive shell and your scripting shell can be, should be, and often are, different. I use bash as my default user shell, fish as the default shell of my terminal emulator, and I write scripts for both POSIX sh (dash and busybox ash) and bash. I end up using three different shells with different purposes. Sure, I could use zsh both as an interactive an…
Then you have to learn two languages. And switch from one to another when you need to do some scripting. I don't write shell scripts a lot, I prefer to write python scripts (that are more maintainable and simple to write). But I write complex commands in the shell a lot, for example I may need to convert a bunch of images from one format to another, just use a for loop with imagemagik directly from the command line,…
The more languages you know the more valuable you are. I prefer to only write golang but sometimes that leads to typescript, Makefiles and bash scripting as well.
Re: The fish shell is amazing
#285Earlier quoted context omitted.
ZSH plus oh-my-zsh cd’ing into a git repo with large LFS files will hang your shell even on very fast NVME storage.
I found that all I really wanted to show was the current branch, which I do with https://gist.github.com/ivan/79de5e87210e8cf21e305bb4c30c436...
set -l git_branch (git branch 2>/dev/null | sed -n '/\* /s///p')
if test -n "$git_branch"
echo -n -s (set_color yellow) "" (set_color normal) " "
endRe: The fish shell is amazing
#286One key thing I like from Fish is their command history feature, where you can use the up/down to move backward/forward the history.
I can't find a way to get this to work in ZSH I don't like having to CTRL+R for going backward (how do you even go forward, I can't remember :D)
Re: The fish shell is amazing
#287I really love fish and the philosophy behind it, especially the "configurability is the root of all evil" attitude. Makes for a well though out software that is a true pleasure to use.
Re: The fish shell is amazing
#288Earlier quoted context omitted.
Another issue with zsh plugins is that they are incredibly slow. Oh-my-zsh makes every terminal feel like it’s running on another machine over ssh
this is probably the git plugin doing a "git status" or similar. Check the "plugins" array in .zshrc
For example, to me, it is _insane_ that in 2021 async prompts are not a completely solved problem. The shell should provide a mechanism to do so easily, rather than duct-taping thin veneers over syscalls via a scripting language.
Re: The fish shell is amazing
#289Earlier quoted context omitted.
Not going to ping my coworker that deals with this (Happy Thanksgiving), but the version shipped with OSX was several versions behind Linux.
I just checked it on my Mac and my Ubuntu server. MacOS has version 3.2.57(1) Ubuntu has version 5.0.17(1) Apparently Apple cites license concerns as the reason for not upgrading it. Don't know how valid that is. License on version 3.2.57 is GPLv2 License on version 5.0.17 is GPLv3+ It's simple enough to update if you use homebrew. `brew install bash` Add the brew version of bash to the /private/etc/shells and change…
Re: The fish shell is amazing
#290Earlier quoted context omitted.
If your bash script has a shebang you shouldn’t need bass at all. Fish will read the shebang and just run your script with bash. The only thing I ever used bass for was this edge case where at work the way we login to AWS is using this Okta AWS integration that prints out a list of export commands. Since fish isn’t compatible with bash export commands, I just run that command result through bass, which automatically…
> If your bash script has a shebang you shouldn’t need bass at all. Fish will read the shebang and just run your script with bash. Shebangs are actually handled by the operating system kernel! I only know this because certain kinds of shebangs work on Linux, but not on other OSes