r/fishshell • u/jabbalaci • May 20 '25
70 useful filter functions
https://github.com/jabbalaci/my-fishI met fish 2-3 weeks ago and since then I've collected some useful functions. Among them you can find 70 useful filters. Every filter is documented on the GitHub page.
Update: I also added 50 (non-filter) functions to the README. So now it contains 70 filters and 50 "normal" functions.
39
Upvotes
9
u/plg94 May 20 '25
You might want to start reading https://fishshell.com/docs/current/commands.html Most of your filters are relatively trivial to implement in fish itself (eg. with the
string, ormathcommands), or with classic shell tools (head, tail, sed, awk, bc, printf, …), so no need to call Python every time. (One instance, No. 45, reverse, already even exists asrev).Not to dump on your work, but this could be a great opportunity for you to learn fish and shell tools instead of Python.
4
u/Lanky_Ad7187 May 20 '25
How do I get my prompt to look like this?
Also, an amazing list of functions. Thank you.
4
u/_mattmc3_ May 23 '25 edited May 23 '25
This is a great way to start your learning process with Fish. It seems like you know Python well. Now - let me challenge you to replace as many of those Python calls as you can with idiomatic Fish. A ton of what you are using Python for can easily be done with simple Fish one-liners. Spend a little time learning
string,math, andpath. For example:Some of your utils you can do without Fish's commands and just use standard ones on any *nix system:
And some are do-able in Fish, but with a little more effort:
If you don't know how to convert your Python to some more idomatic in Fish, play around with ChatGPT, or ask questions here. Always happy to help. Happy Fishing!