Fish Is A Modern Shell For The Sophisticated User
HTML-код
- Опубликовано: 8 апр 2020
- Fish is a user-friendly command line shell for Linux and MacOS. It has a number of smart features and improvements when compared to other popular shells, namely Bash and Zsh.
REFERENCED:
► fishshell.com/ - Fish Website
► github.com/oh-my-fish/oh-my-fish - Oh My Fish
► www.distrotube.com/blog/fish-... - DT's blog
WANT TO SUPPORT THE CHANNEL?
💰 Patreon: / distrotube
💳 Paypal: www.paypal.com/cgi-bin/webscr...
🛍️ Amazon: amzn.to/2RotFFi
👕 Teespring: teespring.com/stores/distrotube
SOCIAL PLATFORMS:
🗨️ Mastodon: mastodon.technology/@distrotube
💬 IRC: irc://freenode #distrotube
👫 Reddit: / distrotube
📽️ LBRY: lbry.tv/$/invite/@DistroTube:2
DT ON THE WEB:
🕸️ Website: distrotube.com/
🐿️ Gopherhole: gopher://distro.tube
📁 GitLab: gitlab.com/dwt1
FREE AND OPEN SOURCE SOFTWARE THAT I USE:
🌐 Brave Browser - brave.com/dis872
📽️ Open Broadcaster Software: obsproject.com/
🎬 Kdenlive: kdenlive.org
🎨 GIMP: www.gimp.org/
🔊 Audacity: www.audacityteam.org/
💻 VirtualBox: www.virtualbox.org/
Your support is very much appreciated. Thanks, guys! Наука
Fish is good for the brain, lots of Omega-3 acids
heavy metal poisoning on the other hand isn't good for the brain. also killing sentient things for a fatty acid is a big doodoo
@@CPSPD yeah, but you wouldn't usually eat the bass, you would slap it!
@@zyansheep slapp
The omega-3 come from the seaweed they eat. We can eat that directly for a more sustainable diet :)
@@helkafen100 I din't know tuna or any fish tuna preys on, eats seaweed. Heh! Or, does it?! XD
I've been using Fish for years, it is ace! ♥ Pro tip! Keep your fish history backed up or in a dot file manager. My Fish history is many years old now and Fish is practically telepathic 🧠 as a result.
Oh, I should definitely do that!
Good call!!
Be careful though. Sometimes I type sensitive data in my shell and forget to add a space in front of the command to prevent it from being logged to the history. You don't want to have your password up on GitHub.
Gianluca Recchia “man history” - you can delete lines on the fly (or rather, stop them being written at the end of your session)
@@brainplot git-crypt and gitlab private repo = rest easier
Abbreviations are often a good alternative to aliases and they're a unique fish feature. When you press space after typing out an abbreviation, it gets expanded.
they are not a unique fish feature, i use it on zsh without any plugins
@@joaopedrodeamorimpaula8965 Also the abbr command?
@@timonpasslick not really, i just add them manually.
fish is an amazing shell indeed, but the fact that it is not posix compliant and the little things it does different annoy me. it would be a pretty significant workflow change to adapt to it, since i've been using posix shells for 5 years, in exchange for some (in my view) minor improvements on features i already have.
@@joaopedrodeamorimpaula8965 I'm new to Linux so fish is best for me but that makes sense.
I'm imagining a compatibility layer project being called “bish”. Or “fash”.
Probably don't want to call it fash lmao
bish the fash
@@xijinpingpong4426 on site
Bish for obvious reasons :)
it exists, but is called bass
I learned a lot on my archlinux just by watching videos from your channel for a few days, like this one I just ran, I love it! thank you so much :)
@DistroTube I disliked Linux for the longest time due to some unfriendly individuals in the community, the steep learning curve, limited software, and trade-offs. But over the years of watching your videos..I have slowly seen how positive the community can be through your videos and how positive and amazing you are yourself. I installed Ubuntu 20.04 and have labored through some of the pains of setting things up but I have come out with a better grasp and some love for how Linux operates compared to windows. There are some things it does genuinely better. Im really happy I subscribed to you. You are the best of the best in the Linux community and to me at least a prominent face of the community. You should add a contribution button to your youtube so I can thank you :)
This is not discord
@@Yuriyalloween This is sparta
i know it's been a while, but here's a welcome to linux to the past you
Be careful! That's how it starts, Ubuntu VM just to play around at first and before you know it you're talking to random strangers how amazing Arch is.
@@dejangegic this sounds all to famillair, lol
ahem
arch user btw :P
Have been using fish for one month now, and it is amazing, the abbreviations and flag completion is just so great.
And it's vim mode rocks.
Hey @DistroTube, thank you for the videos. I'm transitioning from a lifetime of Windows usage to a desktop with Pop Os! and laptop with Manjaro XFCE. Hopefully this is the start of a career pivot from the renewable energy industry to systems administration and some hobby development.
Your style of granular narration is teaching me an enormous amount of "soft skills" for general Linux usage. I may not know enough yet to know what shell is right for me on my default unconfigured distros, but watching this video taught me that I can cancel a terminal command with control + C. I legit didn't even know that until just now.
Your content is very ADHD + chronic stoner friendly, I'm learning a ton. Looking forward to becoming a patron!
2:37 Oh no, FISH has dominated his life!!
Your videos actually encourage me to use Linux more and more. Currently, I am using Ubuntu in WSL right now and really loving the experience so far. Hopefully, I can make the switch in the future.
You alive?
I was sold on fish 5sec after I used it the first time. People say command lines are old-school, but fish proves that they are nextgen productivy tools.
Texas Genius. No doubt you're the BEST Linux channel here on RUclips. Today I just watched so many of your videos, I will watch all your videos. Thumbs UP
I just started using fish (I know, I'm a little behind) but it's nice to be able to go through the archives and find stuff like this. Who knows if it will be accurate in 2 years or not. We won't know that until 2022 I suppose. Thanks DT!
It's 2023....it's not accurate anymore.
Fish is great. I've been using it for years. I couldn't use any other shell at this point.
I’ve used fish for as long as I can remember using Linux. Thanks for reviewing this shell.
Thanks a lot! I'm happy with fish-shell ! :)
Took me a very long time to consider using fish, as I didn't know enough about Linux in general. But then I found bass:
wiki.gentoo.org/wiki/Fish#bass
bass "...executes a given command in bash and then transfers updated environment variables back into fish." 😎
And yeah I know; I linked to the Gentoo Wiki. Don't be scared. Sure, I know most people aren't a level-IV-Linux-Neckbeard like me, but even if you're running Linux Mint, I assure you that with nothing more than manpages, Arch and Gentoo wikis, you'll have all the information you need. Damn-well near all the Linux information in existence.
This comment felt so cringey
Thanks for this I'm just learning Linux and this is a must have imo.
Wow! Finally a sane Fish Shell review on ages! I mean, the thing which we see most out there is heavy criticism on Fish, usually cause it has a different syntax and "Bash is present in every Linux distro blah-blah-blah". People need to learn to be more impartial and make it very clear when they are putting out PERSONAL OPINIONS. When we do that, we're open to experience new things, leaving useless preciousness behind. And you did that. Many thanks for your channel being the source of many experimentations I've been doing in my Linux environment. Thanks again :)
Brilliant! This is exactly the type of thing I've been looking for...
Been using Fish for about a year. Not changing anytime soon!
Yes, it reads my mind. Have you noticed that the auto-suggestion (in grey, comes up with right arrow) for many commands depends on which dir you are in? If I don't see the familiar stuff there I know that I forgot to change dir. :-)
It does! Also, Alt+ and Alt+ to intsantly change PWD is awesome time travel! >
Amazing video man
Thanks fo rthe vi in bash comment. I thought this was possible, but didn't know. I appreciate your keyboard centric videos. I hope to try the keyboard centric display managers soon.
Thank you, Derek.
Ta Mr D, am gonna give this a go as I have never heard of it, it doesn't matter how long you use Linux there are always new things to learn..kudos
btw you don't need your `alias ..='cd ..'` since that functionality is built into fish.
In fact, if you type in any directory path, it'll cd straight to it, e.g. `~`, `/etc` or `path/to/dir/` (relative paths require a slash at the end)
Also, you can source bash scripts from within fish as if they were native to fish with bass github.com/edc/bass
Nice. In fact, just typing ".." without the cd works! :D
YES DT! I've been on fish for almost a year and its SICK
Exploring the linux universe with DistroTube👀
From the S shell's github page
"I suspected that since bash syntax is very complex, the parser is going to be a lot of complicated code too. So I did some line counts of various shells to see what the situation is like:
name. ` ` ` ` ` ` `.c .h
gnu bash: 138227,` 13746
zsh: ` ` ` ` ` ` ` 135589,` 5698
shivers scsh: 118475 (scheme)
templeos: ` ` ` 119115
mirbsd mksh: `29223,` 2562
debian dash: ` 16503,` 2084
freebsd sh: ` ` 15453,` 1622
es shell: ` ` ` ` `` 9017,` ` 1436
plan9 rc: ` ` ` ` ` 5989,` ` `327
execline: ` ` ` ` ` 3794,` ` ` 117
(the " ` "s are there because youtube butchers multiple spaces)
The line count for TempleOS isn't just counting its shell. It's the linecount of the entire system: The operating system kernel, the compiler, the shell, the drawing program, the graphical user interface, the 3D flight simulator. Bash, zsh and scsh have more code in them than an entire operating system."
The mainstream shells are all incredibly bloated, and the fact theat bash and zsh have more lines of code than an entire operating system is also very funny, although i generally don't care about the bloat meme too much, this is just ridiculous, how can a shell have more lines of code than a 3D flight simulator, drawing program, kernel, and another shell?
i recommend sticking to the more lightweight shell and extending it yourself.
Jonathan Blow's shell: finally a shell that won't break my computer LOL
Awesome shell... Very very nice
This is a shell I might actually try, though the non-POSIX will definitely take some getting used to. Thanks for the tour.
There is a shell that I would like to redirect you to called FIZSH (Friendly Interactive Z Shell), which is a front end to ZSH with interactive syntax-highting and Matlab-like history search (like fish), while still being POSIX compliant. github.com/zsh-users/fizsh
It's not just for Linux and macOS (Darwin) btw. I know it from GhostBSD, a FreeBSD distro. And it works on many other OSs, such as Illumos :)
this is a completely extreme level that i really want to be able to use, but I'm such a noob, the idea of using a git as your origin just completely blew my mind, im over here trying to consolidate my storage and keep backups and thinking about portable install, and its like, ultimate portable system would obviously be keeping the basic stuff network attached, I knew there was a lot to learn about linux but jeez, this rabbit hole goes all the way down to the moon
Been using fish since 2015 when I got my first developer job 🙂 I love it!
Hi DistroTube, I really liked your video :) I have been using Fish and I was not aware of omf. I installed omf and I installed the theme called sashimi as I personally think it looks the best. However there are two things that I wish to change about it.
1) if I am in lets just say ~/Desktop/testing, it would show _testing_ only. I wish it would show the file file path like it does on bash. Is there a way to change this?
2) In your video we can see if you are in insert mode or normal mode, for some reason that doesn't show on my fish shell, what did you do to configure this?
Another advantage of fish is that the grammar is decidable (and in fact it is LL(1) ), unlike POSIX shell which is undecidable (with aliases being the most common cause), and implemented slightly differently by each shell in practice when aliases and interpolation happens. It is actually possible for a mere mortal to sit down and write their own parser for it
In particular, fish commands deal with arrays of strings instead of interpolating whitespace separated strings everywhere, and there is no text-based alias, only function definitions that are good enough so that defining a text-based alias is not necessary
WHAT? A web browser config tool built-in?? Beautiful!
loving zsh with syntax highlighting currently
There's a faster and a bit more advanced highlighting compared to the standard for zsh out there. Worth checking out: github.com/zdharma/fast-syntax-highlighting
You sound like Eugene from TWD. Keep up the good videos ✌️
Wow, thanks! Eugene is the man!
I love your manner of speech. Idk if it’s an accent or that combined with your idiosyncratic speech characteristics. Where are you from?
Really great video about fish. It is my default shell now, thanks to you.
Hey, just wanted to know. Do you run fish as your default terminal or only as your interactive terminal?
You can do anything from this video in zsh (though it will require a lot of configuring, especially if you're like me and refuse to use Oh My Zsh because it's bloat), with the added benefit that zsh is POSIX compliant and you can use it for scripting.
how to add the listing of available flags to zsh? as in 2:03 - nevermind, found it, but it does not look half as nice as in fish
@X GNU Bio Do you know what POSIX compliant means? It means that it runs any script that is written according to the POSIX standard. Zsh will run any such script. Bash also. But Fish won't.
Of course, both bash and zsh have features that go beyond the POSIX standard. But that is only an added bonus, not an problem (because the entire POSIX standard is covered).
However, on fish you can run only scripts written for fish, and nothing else. On zsh and bash you can run any POSIX compliant script, plus the scripts written specifically for bash and zsh, respectively.
@@gaweyn On Arch Linux install the package "zsh-completions" and add the following to your .zshrc:
zstyle :compinstall filename '/home/yourusername/.zshrc'
autoload -Uz compinit
zstyle ':completion:*' menu select
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}'
zstyle ':completion:*' rehash true
zmodload zsh/complist
compinit
For more details, how to customise colours etc, RTFM. You can make it look as good as on fish. Find a good example of a .zshrc online and just steal from it. Or use Oh-My-Zsh, if you're a total nôôb.
Have you tried zplug? It's the new hotness.
@@LaurenZou nope. I'll look into it, but I'm fairly happy with my manual config.
Zsh is my favorite. Auto suggestions is SO helpful
I ditched fish today for Elvish, still playing with it but I like it so far
you also can have that vi-mode indicator in bash.
thanks for showing me the power of fish i use it now on my arch install
Was anyone else expecting "some of the coloring going on with fish fish fish fish fish fish fish..."
I also used fish and was happy with it for interactive use, but it is not compatible with bash, e.g. interpolation works differently. Therefore one needs to make sure it is only used for interactive use, which is a pain. I switched to zsh / oh-my-zsh and am really happy with the choice.
Try oh my fish
There's really no need to use oh-my-zsh. It's bloated af. Just put the plugins in some folder and source them from .zshrc. Same goes for themes. And you can just put all the aliases you need in one file and source that as well. And they are also other less bloated plugin managers for zsh, e. g. zplug
@@konstantink07 Thanks for the suggestion, I never thought about optimizing this and was quite happy with my setup. I will look into zplug, too.
I love fish for interactive auto-completions and other sophisticated stuff, but so far I have 2 annoying things with it:
1. (slightly annoying) Delete key deletes characters to the end of line and then begins to delete backwards, like backspace.
2. (very annoying) There is some issue with re-rendering active line. It's a little bit hard to describe. If you just type some command, even a long one with parameters, or navigate through history and run it as is, everything works fine; but if you pull a line from history and star editing it, use auto-completion or switching between normal and insert modes, it will mess up the current command line.
Does anyone had those issues and found any solution?
this is gold mine!
There are two things I really didn't like about fish when I was using it (now I use zsh):
1. Renaming $() to (). With that, they removed the possibility of the posix () to e.g. pipe the output of multiple commands into one, e.g.
`(cat test.txt; journalctl -xe | grep "123") | lolcat` (there are more complex examples where you can't replace it easily with process substitution but I wanted to make something simple)
Also $() does make more sense to me, because the functionality is very similar to $variable, where it also kind of parses the output inline instead of writing it to stdout like () does.
2. Having a web browser builtin. Yeah, this may be useful for many people, but I don't want it and it's a shell running a useless web server on my computer. If it was something separate that just edits the fish config files, I would be totally fine with it.
I had some other complaints, but it's been like a year or so since I switched to zsh and I don't really know everything anymore.
I agree, I also didn't like the change to `end`, I think it's pretty arbitary, you can just remember one thing (spelling the initialization keyword backwards) in posix sh and it's not really simpler to use end then.
I would add the setting variables in fish is horrible.
It doesn't have a webserver built in. What `fish_config` does is run a small script written in Python. Assuming you're running a Debian derivative like Ubuntu, you can find the script at /usr/share/fish/tools/web_config/webconfig.py.
@@talideon Oh well, you are right, it's not really built in, I confused it with cups where it is builtin.
I’ve always wondered how you get bash powerline and now fish to use git bare repositories as by default it doesn’t detect the branch or anything.
Thanks for this vid DT. Im just starting to learn scripting. Do you think it’s a good idea for me to just learn fish syntax since it is a bit different? I really like that it comes preconfigured with plugins.
No, I think you should start learning posix sh (or bash, which is posix sh with additional features). You probably don't want to script in fish, it's just made for interactive use. Thus I wouldn't recommend fish at all, because it makes things harder for your because you have to and posix sh syntax for scripting and in addition fish syntax for interactive use, which can result in you typing $() in the fish all the time, which is quite annoying.
DistroTube: because my home directory is a git repository
Me: surprised pikachu
Why is neovim your default editor instead of emacs, which you've done some videos on?
always good to explore other shells. I don't know if it offers anything that would make me switch to fish.
Auto completion
@@banguard856 BASH has auro completion, as my twitchy pinkie finger over the TAB key will attest 😀
@@kellingc they just added that, starship with fish is still nice
Fish fish
Fish fish
Fish fish
Oops....DT hung up...
I love fish. I like to ask if you don't mind: why using aliases over abbreviations?
I've noticed a weird quirk in Fish:
I have figlet set to display my name whenever I open my terminal in my config.fish
Whenever I execute a shell script, figlet displays at the beginning of the script,
meaning that Fish re-executes the configuration file when a script is ran?
It's quite annoying, and I can't find a way to fix it.
Switched yesterday. From zsh. Really amazing.
Installing now!!!!
Thanks for sharing this vid! btw what theme (vim) are you using?
I'm not doing anything special in vim. Here is my neovim config:gitlab.com/dwt1/dotfiles/-/blob/master/.config/nvim/init.vim
As far as the terminal colorscheme:
For Alacritty: gitlab.com/dwt1/dotfiles/-/blob/master/.config/alacritty/alacritty.yml
For St: gitlab.com/dwt1/st-distrotube/-/blob/master/config.h
For Urxvt: gitlab.com/dwt1/dotfiles/-/blob/master/.Xresources
@@DistroTube whoa! thx for the fast reply! I am really enjoying your videos, and you made me come to the vim world (been using vim for a week now)
Hey what are you using to generate those pacman / space invaders / etc. logins?
I finally found it, it's on his GitLab: gitlab.com/dwt1/shell-color-scripts
Yep. Seems like Fish + Starship is enough for replacing a tons of things and hours in zsh, evenmore bash :D
I quit zsh after noticing that the only plugins I used were actually built into fish. And man, starship is damn fast. I might just finally stop hopping between utilities and settle down for a while
I loved Fish! But many of its commands were so different than others, I decided to lean in to zsh with “oh my zsh” instead.
Agreed I use the same, but fish is sexy af. I'm so tempted.
Better use zplug, it's far less bloated
@@konstantink07 better use zinit, it's even less bloated
Is there a Posix 32 compliant fork of fish? I like many of the features, but I don't use the terminal just for MY system, but I do scripts for all my devices and servers, also systems for other people, so having a non compliant shell doesn't do me a favor.
Grandpa said if a fish is bloated, toss it overboard
If you are using zsh and like the syntax highlighting in fish, there is a pretty cool plugin called zsh-syntax-highlighting
Danny Foldager Thomsen Very nice plugin.
is it as good?
@@room641A I haven been using fish that much too really tell difference. But I like it.
@@dannythomsen allright tanks ! il move to zsh and use that plugin
I was using up to the day I had to sftp from one machine into the other and fish didn’t detect it wasn’t an interactive session. It displayed a long welcome message crashing sftp.
Went back to zsh
What is the window manager that you are using in this video?
well i think im gonna dive on that
How do I get a dark theme on the fish configuration webpage like that?
Fish has a web configuration for previewing and configuring themes and such.
Good video.
First thing I install on a new distro
I have everything I need in Zsh, I don't see differences at all.
Oh My Zsh! Yes.
Fish is a bit slower and doesn't support bash
@@csbnikhil I don't use Oh My Zsh. Everything manually.
@@AaronStarkLinux I'd like to reach that Zen Mode someday.
@@csbnikhil Everything you need is in the documentation.
Man, I love fish
DistroTube when you can please try xonsh. It is an interesting shell.
Will never replace Zsh with Oh My Zsh.
Fish has Oh My Fish which is pretty darn similar.
@@semilin I've seen it, yeah.
I am a user of Zsh and Oh my Zsh and can understand that as well. You just get addicted to it...
@Him God I hope so
I tried fish and I also like Zsh with Oh My Zsh more.
Backspace doesnt wirk in vim with fish, it works with bash
have you tried `fizsh`?
I would love to see how you would solve chroot or jail for ssh users but also for sftp. Can fish be used for sftp clients like filezilla or winscp? I need to move away from cpanel hosting and moving to containers with bind mounts with sftp with restricted shell for running composer, node, etc.
I do find Fish autocomplete very useful! I have lots of servers to ssh in, and autocomplete from .ssh/.config is great!
Why not use a connection manager?
@@nobytes2 No reason to use anything more than a .config, in my case anyway.
@@janis.berzins I work with hundreds of servers too using mtputty but I'm sure there are equally powerful tools for Linux. They got some pretty cool features, but hey maybe is too much bloat for you. github.com/asbru-cm/asbru-cm
I was expecting that the command for color would actually do what it says, instead of standard white-on-black.
There is literally zsh-syntax-highlighting and autocomplete
Question:
What is the plugin to enable that vim status thingy? Did you customize your own theme?
Do you mean the status line at the bottom? Most likely Airline or other Powerline-like plugin.
i mean the insert and normal mode sruff. the vim plugin for fish cl doesn't give me that but the fish internal setting does, thanks
How does he do that pacman colourful greeting whenever he open a terminal?
only thing keeping me from switching is that "sudo !!" doesnt work. im sure there's a way to implement it though
"Fisch ist eine moderne Schale für den anspruchsvollen Benutzer" Anyone else getting these super broken machine translations of video titles in the search results?
Manjaro awesome edition has something similar to this. Where it changes red to green. Interesting
Yea it comes with oh my zsh. I've been using oh-my-zsh for a while. It shares many features with fish, wile being a bit more familiar to those used to bash.
Can someone tell me the name of his theme colors and how or what to use to get the pacman and fish stuff on top on terminal start?
Dracula theme, idk about the other stuff. It's transparent and probably running in alacritty. The stuff at the start with the pacman and fish is probably some program like neofetch running when he launches a fish shell.
fish has one problem: most of the things on the web work mostly for sh/bash/zsh so fish will always be a niche case. I started using fish and just changed to oh my zsh and i dont miss it at all.
you should too.
Exactly what I did! In isolation, Fish was great. But I'm not always just on my machine. I want to get used to the same commands that would likely work everywhere. That's part of why we love using the terminal in the first place. :-)
Nice video Distrotube. Can you try also PowerShell, since it is open source?!
GOOD ONE
I've always wondered what is the purpose of PowerShell outside Windows. I get names as "ls" or "cat" aren't intuitive or descriptive but "Get-ChildItem" is both a mouthful and annoying to type.
@@Gabifuertes Although there's some reasoning behind the syntax in PowerShell, I must say that it could be rethought and improved. The interesting idea is the concept of objects inside the shell. (And I am not talking about object oriented programming where you create classes, etc. [I don't think that is useful in a shell]). What I want to express is , we all know command like wc, sed, awk, etc to manipulating strings, are very useful. Even more useful is Manipulating objects in the shell. Imagine pipeping and displaying results only by selecting some properties of your first content. I am a Linux fan and I like the concept of objects oriented shell. I hope that someone else does something better than PowerShell. Currently it's the only one.
I’ve used both powershell and bash. I love Linux and bash. Linux is the best operating system to play around with. However having spent time learning some of both shells. PowerShell is definitely the better shell
Gabifuertes I’ve spent time learning both bash and powershell. The “verb-noun” syntax is easier to memorize than the bash syntax
i might actually switch to fish.. i have a zsh config working now that i like but if i can reduce my config even further with fish and its sensible defaults then i think i'll try it
people say it's bad becuz it's not posix-compliant but u can just use a shebang to get around that, or just switch to bash for scripting
4:40 -- Your home directory is a git repository??? How do you work on any git project under ~/ ?
He uses the home directory as a bare repository, afaik. Which fixes that problem.
Sophisticated is not formed by sophistry and complicated, but sometimes it could be.
Have you checked out the ion shell?