fosstodon.org is one of the many independent Mastodon servers you can use to participate in the fediverse.
Fosstodon is an invite only Mastodon instance that is open to those who are interested in technology; particularly free & open source software. If you wish to join, contact us for an invite.

Administered by:

Server stats:

8.7K
active users

#fishshell

2 posts2 participants0 posts today

For sharing a common Fish shell configuration between multiple operating systems, the `switch` command is useful.

Using `switch` I can execute different blocks of code depending on the OS reported by `uname`.

Example:

```
switch (uname)
case FreeBSD
abbr -a l ls -aFhl --color=always
case NetBSD
abbr -a l colorls -aFGl
end
```

See: fishshell.com/docs/current/cmd

fishshell.comswitch - conditionally execute a block of commands — fish-shell 4.0.1 documentation
Replied in thread

@andre123 è consigliato prima scaricare poi controllare almeno. Almeno c'è l'https quindi nessuna sorpresa in the middle.

Però faccio lo spottone a #fishshell: da configurazione ha un bel po' di schemi configurati di fabbrica, giusto un fish_config e si va su browser web

Replied in thread

@tsvenson the usability you get from fish without any configuration is very polished, like a more easy directory navigation, a more gentle language, safe copy-paste behavior, amazing auto completion... nothing less should be a default shell on any system

Switched my config from swaywm to hyprland. Also switched from foot terminal to kitty. Have a weird issue where fishshell won't show nerd font glyphs if started automatically from the kitty config. Works fine in foot. Works fine if I launch fish from bash in kitty. Only doesn't work when I start fish automatically from the kitty config. Got this far in narrowing it down and now I'm stumped.

just learned one can quickly visit historical directory locations in fish shell with alt-left, then forward in history with alt-right

one can alternatively type "prevd" or "nextd"

one more thing, "cdh" can be used to list all dirs that have been visited, with an option to visit any of them quickly

For ages I used `bash` simply because its the default shell on most Linux distributions. Now that I'm exploring FreeBSD I thought to myself, why not also consider alternative shells?

I briefly used the FreeBSD default `sh`, then spent a few weeks with `oksh` (portable version of OpenBSD `ksh`). Inspired by @b0rk 's "Reasons I still love the fish shell" I decided to give the aforementioned shell I try... 🐟

dwarmstrong.org/fish-shell/

I ❤️ it and its my new interactive shell.

www.dwarmstrong.orgGetting Started with Fish ☯ Daniel Wayne ArmstrongLibre all the things

I’m having a weird lil problem with Fish shell. I’ve just finished to write a little script to use with my Waybar config. The script is located at ~/.config/fish/functions/the-script.fish and have inside it multiples functions.

When I’m calling the script directly from my Fish shell, the script works perfectly. But if I call the script with fish -c the-script.fish(which is what I’m basically doing with Waybar), the script throw stupid errors like “Uhh command what (when calling a function)? None of theses words are in the bible.”

And I don’t get why Fish behaves so differently depending on how I call the script :neocat_woozy:

RT appreciated :neocat:

(The script I’m talking about as reply bellow)

I got up to some fishy business yesterday, and wrote a blog post about it 🐟

More seriously, I wanted to figure out how transient prompt works in projects like Powerlevel10k, and once I did I decided to write it down.

https://nevkontakte.com/2025/transient-fish.html

It's a bit sad that I rarely have enough energy for random exploration outside of a vacation… But at least it's good to know that my brain is not a boring tin can yet.

nevkontakte.comCustom transient prompt in Fish | Ne v kontakteAsocial programmer's blog
Replied in thread

@b0rk More confident thanks to a lot of the convenience #FishShell offers in this area (`fish_add_path` 🤯). Less confident when it comes to how environment variables are/should-be shared between the system environment and the shell. e.g. What environment variables are available to programs launched from the context of my window manager vs my terminal emulator?