Live data from Hacker News

Fish Shell 3.2

github.com

121–130 of 133 posts

Re: Fish Shell 3.2

#121
Probably my favorite feature with fish is the improved globs. I can do

  **.pdf
to recursively get all pdfs or

  *{.flac,.mp3}
to only get flac and mp3 files from a directory.

Re: Fish Shell 3.2

#122
I've been using fish for 3 months now after using Bash for 20. I'm probably going to switch back in the next few days.

I LOVE fish but they went out of their way to not be compatible with Bash (like (pwd) instead of $(pwd) for expanding) that break a lot of existing scripts.

The breaking point for me was when the rust/cargo env didn't work in it because they don't have compatible case statements.

Re: Fish Shell 3.2

#123
post #122

I've been using fish for 3 months now after using Bash for 20. I'm probably going to switch back in the next few days. I LOVE fish but they went out of their way to not be compatible with Bash (like (pwd) instead of $(pwd) for expanding) that break a lot of existing scripts. The breaking point for me was when the rust/cargo env didn't work in it because they don't have compatible case statements.

That is why I used fish only as a tool to write my own little scripts instead of using it as an interactive shell but not for the scripts that may be touched or used outside of me.

Zsh with plenty of plugins makes it pretty convenient as a shell that is still compatible with most bash scripts.

Re: Fish Shell 3.2

#125
> A new special input function forward-single-char moves one character to the right, and if an autosuggestion is available, only take a single character from it (#7217, #4984).

Huh.

It feels super weird to see this finally hit release. Feels like a lifetime ago that I made this patch, I'd completely forgotten about it.

Since then I've gone through another lockdown, quit my job, started a Rust GUI framework, and started doing self-employed consulting.

Also it feels kind of humbling to think about the weeks I spent writing it, and then see that it's only a bullet point in a changelog that has hundreds of them (most of them a lot more useful than mine).

Cheers to the fish community!

Re: Fish Shell 3.2

#126

Fish is my shell of choice, like many in this thread. To me it just works, without configuring anything (ok, maybe a couple of aliases), with great defaults. As an example, type anything(for instance, '.conf') + up arrow, and there you see all the completions (for instance, 'less /etc/postgresql/10/main/pg_hba.conf' shows for me) based on the shell history. You can then cycle through them with up/down arrows. It is t…

> As an example, type anything(for instance, '.conf') + up arrow, and there you see all the completions (for instance, 'less /etc/postgresql/10/main/pg_hba.conf' shows for me) based on the shell history. You can then cycle through them with up/down arrows. It is the same as ctrl+R in bash, but so discoverable and plain. I found tons of similar details in fish.

Fun anecdote: my school's crappy homebrew distribution had a bash plugin that did exactly that (it was the distro's one redeeming feature, honestly).

After I moved to other distros, I missed that feature for years (I hate Ctrl+R).

Looking for plugins that implemented it was how I found fish, and I never looked back.

Re: Fish Shell 3.2

#127

FINALLY!!!!!! A new "fish_add_path" helper function to add paths to $PATH without producing duplicates, to be used interactively or in config.fish (#6960, #7028). For example: fish_add_path /opt/mycoolthing/bin will add /opt/mycoolthing/bin to the beginning of $fish_user_path without creating duplicates, so it can be called safely from config.fish or interactively, and the path will just be there, once.

YES. Just couple days ago I've mangled `config.fish` with wrong use of `$fish_user_path` and was wondering why my shell started throwing errors of `$PATH` being too long, which duplicated itself to infinity and beyond. That's what you get when you don't read the docs fully.

Re: Fish Shell 3.2

#128
post #79

Earlier quoted context omitted.

The parsing and setting of environment variables was always my #1 hassle with fish. I feel like I see a lot of BASH snippets that get copy pasted around that I always had to re-write or throw in a sub shell. Particularly annoying when you're trying to do something while screen sharing and somebody gives you a snippet which you have to re-write before using it- "Oh yeah it's a hassle but I've got sweet auto-complete"…

Agreed. I really wish they would adopt `export`. It's not like `set` is any better.

It has had `export` for years: https://github.com/fish-shell/fish-shell/blob/master/share/f...

Re: Fish Shell 3.2

#129
post #105

My favorite Fish plugins: - jorgebucaran/fisher - Plugin manager - IlanCosman/tide - Nice prompt with git status - jorgebucaran/humantime.fish - Turn milliseconds into a human-readable string in Fish. - franciscolourenco/done - Automatically receive notifications when long processes finish. - laughedelic/pisces - Helps you to work with paired symbols like () and '' in the command line. - jethrokuan/fzf - To integrate…

Seems like the author of jethrokuan/fzf sort of recommends using fzf.fish[1] if you don't need some of the features:

> fzf.fish is a newer fzf plugin with very similar features. It lacks Tmux support and fzf tab completion, but includes functions for searching git log, git status, and browsing shell variables using fzf. Additionally, it is more likely to be maintained going forward. You can read more about the differences between it and this plugin in the README of fzf.fish here.

From [1] (slightly condensed):

> TLDR: choose fzf.fish over jethrokuan/fzf if you want faster, more efficient, code, code that is easier to debug if you encounter issues, a tool built on Unix philosophy, a plugin that is more likely to attract contributors because it is more maintainable and has CI, a plugin that will be more frequently updated by its author (Jethro no longer uses fish), features for searching git status, git log, and shell variables and you don't mind having to integrate fzf with Tmux yourself, which is easy to do, not having buggy fzf tab completion

Seems like it can search git status/log as well.

1: https://github.com/PatrickF1/fzf.fish

Re: Fish Shell 3.2

#130

Earlier quoted context omitted.

Agreed. I really wish they would adopt `export`. It's not like `set` is any better.

It has had `export` for years: https://github.com/fish-shell/fish-shell/blob/master/share/f...

Mind blown.

This is the best news I've heard all week. Thank you kind stranger!

Post reply on HN