News for hackers. Stuff that matters.
Re:fish-shell: the user-friendly command-line shell by dinckelman on Saturday August 26, 2023 @09:47AM (#37272880)
I've used fish for about 5 years now, and I don't really wanna go back. Out of the box, without any addons at all, it does everything my old zsh setups did, with a package manager and plugins. The only change I've made to it was spacefish (now starship.rs)
Re:fish-shell: the user-friendly command-line shell by BeFlatXIII on Saturday August 26, 2023 @10:09AM (#37273097)
What are your use cases for starship? It looks interesting but I think I'm missing the imagination necessary to use it to its full potential.
Re:fish-shell: the user-friendly command-line shell by natebc on Saturday August 26, 2023 @10:35AM (#37273294)
Big one for me was out of the box support for showing current kubernetes context. Very helpful if you work in multiple kubernetes clusters and in particular if you move around namespaces helping others.

Doable with configuration and either lots of work or plugins in other shells but the combo of fish + starship.rs offers a lot for little setup.

Re:fish-shell: the user-friendly command-line shell by Cu3PO42 on Saturday August 26, 2023 @10:35AM (#37273293)
I also use starship with barely any custom config (like fish). It shows me the environment I'm in for a project, including which versions of tools are active and which server I'm currently connected to (if any). And it looks pretty enough.
Re:fish-shell: the user-friendly command-line shell by theshrike79 on Saturday August 26, 2023 @10:33AM (#37273280)
The use case for me is a prompt that Just Works. No need to hack $PS1 or anything else, I just install it and everything works.

There are some optional bits for more niche things (like laptop battery) you can enable with a config file, but it’s not necessary.

Re:fish-shell: the user-friendly command-line shell by lolinder on Saturday August 26, 2023 @11:03AM (#37273521)
I use starship with zsh. The biggest value is showing the current environment for any project without any config. Shows the active node version, Python venv, k8s context, all without having to think about it.

The other day an AWS command was rejected with a generic 403 error and at a glance realized I'd forgotten to switch the default profile—without starship I suspect I would have spent a while troubleshooting my SSO login instead of just switching profiles.

Re:fish-shell: the user-friendly command-line shell by mdwalters on Saturday August 26, 2023 @11:48AM (#37273892)
Not OP, but I use Starship with fish and bash, it shows me my git repo's status without having to run `git status`, which is very useful for me.
Re:fish-shell: the user-friendly command-line shell by beebmam on Saturday August 26, 2023 @09:56AM (#37272974)
Does it have support for reverse search yet? Not interested in auto complete.
Re:fish-shell: the user-friendly command-line shell by tipsytoad on Saturday August 26, 2023 @10:11AM (#37273114)
I like https://github.com/PatrickF1/fzf.fish

Can also do cool stuff like search for a file to open in $EDITOR and searching git log

Re:fish-shell: the user-friendly command-line shell by srjilarious on Saturday August 26, 2023 @10:05AM (#37273070)
I end up installing mcfly (https://github.com/cantino/mcfly) in all my shells, and it works great in fish as well.
Re:fish-shell: the user-friendly command-line shell by petepete on Saturday August 26, 2023 @10:12AM (#37273120)
There's also fzf.fish, the only plugin I use.

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

Re:fish-shell: the user-friendly command-line shell by pbowyer on Saturday August 26, 2023 @12:35PM (#37274341)
Same. A shell without fzf now feels weird.
Re:fish-shell: the user-friendly command-line shell by bin_bash on Saturday August 26, 2023 @10:04AM (#37273052)
you just push ctrl-r just like in zsh
Re:fish-shell: the user-friendly command-line shell by boxed on Saturday August 26, 2023 @10:47AM (#37273389)
type something, press arrow up
Re:fish-shell: the user-friendly command-line shell by WesolyKubeczek on Saturday August 26, 2023 @11:34AM (#37273779)
Good luck with that if what you’re looking for is in the middle of the command, though
Re:fish-shell: the user-friendly command-line shell by cpach on Saturday August 26, 2023 @12:07PM (#37274058)
Fish will match the string even so.
Re:fish-shell: the user-friendly command-line shell by Rebelgecko on Saturday August 26, 2023 @12:22PM (#37274200)
I can search for just an argument and it finds the whole command fine
Re:fish-shell: the user-friendly command-line shell by bobbylarrybobby on Saturday August 26, 2023 @03:52PM (#37276235)
Fish explicitly handles that case
Re:fish-shell: the user-friendly command-line shell by memco on Saturday August 26, 2023 @11:51AM (#37273930)
Maybe the recent ctrl-r behavior changes: https://fishshell.com/docs/current/relnotes.html#fish-3-6-0-... do what you want?
Re:fish-shell: the user-friendly command-line shell by raverbashing on Saturday August 26, 2023 @10:08AM (#37273088)
Did you have to convert your scripts to fish? Or is there an automated way?
Re:fish-shell: the user-friendly command-line shell by bin_bash on Saturday August 26, 2023 @10:27AM (#37273232)
Nobody (I know) that uses fish actually writes scripts in fish. Everyone writes scripts in bash for portability.
Re:fish-shell: the user-friendly command-line shell by prokopton on Saturday August 26, 2023 @11:09AM (#37273567)
I’ve been writing all my shell scripts as .fish files for years. They’re just for me and I enjoy the syntax.
Re:fish-shell: the user-friendly command-line shell by ModernCannabist on Saturday August 26, 2023 @12:31PM (#37274292)
Same! I love the syntax, and I only share my .fish scripts with a friend or two I program with that also uses fish.
Re:fish-shell: the user-friendly command-line shell by theshrike79 on Saturday August 26, 2023 @10:31AM (#37273271)
I’ve used fish for a half decade too, I still write my scripts in bash like everyone else. I want them to be standard an portable.

Longer scripts get the Python treatment or a Go application.

Re:fish-shell: the user-friendly command-line shell by junon on Saturday August 26, 2023 @10:26AM (#37273226)
You can always run .sh scripts
Re:fish-shell: the user-friendly command-line shell by rgoulter on Saturday August 26, 2023 @10:46AM (#37273382)
While there is a tool called `babelfish` that will automatically convert bash to fish, in practice it's rarely needed.

You can run bash scripts from fish.

For sourcing, often it makes sense to use direnv to automatically load variables. -- For "just source this one time", in the worst case you can run a bash shell, source that, then run a fish shell.

Re:fish-shell: the user-friendly command-line shell by stavros on Saturday August 26, 2023 @09:56AM (#37272980)
You may also want to try z, and, err... I don't have my config with me, but I have a plugin that notifies me if a long-running background command finishes, which is really handy.
Re:fish-shell: the user-friendly command-line shell by LibertyBeta on Saturday August 26, 2023 @12:58PM (#37274559)
Same story here. But I recently moved to Tide prompt. It's pure fish and really amazingly fast.