Fish Shell Tips and Tricks (Can Your Shell Do This?)

preview_player
Показать описание
Fish is a smart and user-friendly command line shell for Linux and other Unix-like operating systems. Fish has a lot of modern features that make it a superior interactive shell than more traditional shells like Bash. In this video, I will discuss a few of the "builtin" commands for Fish as well as some of the unique Fish keybindings.

REFERENCED:

WANT TO SUPPORT THE CHANNEL?

DONATE CRYPTO:
💰 Bitcoin: 1Mp6ebz5bNcjNFW7XWHVht36SkiLoxPKoX
🐶 Dogecoin: D5fpRD1JRoBFPDXSBocRTp8W9uKzfwLFAu
📕 LBC: bMfA2c3zmcLxPCpyPcrykLvMhZ7A5mQuhJ

DT ON THE WEB:

FREE AND OPEN SOURCE SOFTWARE THAT I USE:

Your support is very much appreciated. Thanks, guys!
Рекомендации по теме
Комментарии
Автор

What I love about this guy is that he is respectful toward technologies that he isn't using or supports, and gets on to the point of his talks.

atlantic_love
Автор

00:00 Intro
01:57 built in functions
02:51 count built in function
03:18 math built in function (BTW you can also scape the * when running multiplication math function: math 2\*3 an it works as expected )
04:40 random built in function
05:20 prevd and nextd built in functions
06:20 keybindings for prevd and nextd built in functions (tldr; Alt+→ and Alt+← )
07:32 keybinding for ls built in function (tldr; Alt + l )
08:21 keybinding for pager (tldr; Alt + p )
09:57 keybinding for what does that command do? (tldr; Alt + w)
10:58 keybinding to open your $EDITOR (tldr; Alt + e )
12:10 keybinding for forgetting previous sudo command. You know, sudo make me a sandwich :) (tldr; Alt + s )
13:00 Epilogue
13:57 Thanks Patreons!!

And yes I also love fish since many years ago!! And I miss its features when I login in systems with bash shell... :)

jcwl
Автор

I love the fish shell since starting to use it a few months ago. I didn’t realize a lot of these tips and tricks. This is awesome.

PressThatButton
Автор

I've been using fish since last year, thanks to your videos! fish + starship = beyond best.

zenitsu
Автор

(It has been 6 years since I logged onto YouTube to leave a comment.)
Wow. Thank you. Congratulations on your work, congratulations on the CC-BY choice of this video, and I wish you a lot of good things. Finally I'm not POSIX compliant but I'm more happy.

valerioboz
Автор

Like others, I have been using Fish since you highlighted it, but I didn't know these keybindings. The prevd/nextd bindings will revolutionize this for me. Thanks!

DavidHathaway
Автор

I love you so much for these tips. I was using fish without knowing prevd, nextd and especially shortcuts for these and other (like sudo) commands. My life will be so much better now. I think fish should advertise those shortcuts more.

soanvig
Автор

Man, the prevd and nextd keybindings made my morning :D. The Alt+s is also noice!

gabrielalvescunha
Автор

Thanks for the tips DT! About the math problem with the wildcard - the standard way, at least from my understanding is to escape those characters. So math 2\*3 works as expected.

AngelIliikov
Автор

I love the fish shell, even if I have some gripes with it (all of which are circumventable, but they're just pet peeves, y'know) it still has so many creature comforts that I miss with other shells, like the mentioned history-searching autocomplete, or the mode indicator for vi bindings, small stuff like that.

LordHonkInc
Автор

Thanks for the tips! I've been using fish for quite some time along with oh my fish, but I haven't taken a deep dive into the shortcut keys yet.

j_atkinson
Автор

I like both for different reasons, yet Fish's math builtin works quite like expr in Bash ;)
Fish: math 2 + 2 # 4
Bash: expr 2 + 2 # 4
Bash: expr 2 \* 2 # Just escape the * for multiplication

expr just needs space around the operator, 2 + 2 instead of 2+2

AndiKod
Автор

Fish is so awesome out of the box that I use it in both my android and ubuntu. The omf framework also made it nicely customizable

kasroudra
Автор

zsh used to be my favorite back in early 2000s. I haven’t run Linux for over a decade, but glad to hear it’s still around.

jhonaker
Автор

Yeah I can't imagine going back to bash after fish. It's like going back in time but in a bad way. And you're the reason I use fish! So thank you!

irlshrek
Автор

Nice, really cool to learn shortcuts even tho Ive used fish for some years I did not know. Maybe new users should be aware of fish_config command. You can set a theme there an various 'config parameters in a webgui '. Set your favorite terminal to launch fish, and keep the !#/bin/bash in the scripts, not bin/sh and everything will be fine.

syrefaen
Автор

Been meaning to try fish, but I'm also switching over to emacs, and that's killing all the "learning" time I have lately.
A look at NU shell, by JT, would be awesome aswell. He demoed a couple of times and it really brings new stuff to the terminal

driden
Автор

The nice to haves like directory switching and autocomplete have been fantastic for me but the sudo trick is truly amazing.

adamgarlow
Автор

I am pretty happy with fish shell and made it my system default because I know i can pretty much run any bash command with bass and replay, the main problem for me was forgetting sudo, and was thinking to make some kind of alias or function that can mimic the bash style "sudo!" to run previous command with sudo priviledge. For a whole year suffered for it. now alt s, man you are my hero..

ashkh
Автор

If you write the name of a command and alt-up, it will add the arguments of your previous command to the one you're currently writing (say you ls a directory, and then want to cd there, or you cat or less a file and then want to vim or emacs it).

And if you have started to write a command and only want part of the autocomplete, alt-right has you covered.

Alt-delete and alt-backspace to delete word-by-word rather than character-by-character (what is often ctrl-backspace and ctrl-delete in many text editors).

And, of course, the regular up-arrow history scrolling filters by what you have already written.

MasterHigure