Essential Keybindings For Bash, Fish and Zsh

Essential Keybindings For Bash, Fish and Zsh

DistroTube

1 год назад

27,583 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Ken Wood
Ken Wood - 20.06.2023 11:52

Fix the stupidity by adding set -o vi to the end of your .bashrc and enjoy vim keybindings.

Ответить
Vanshaj Dhar
Vanshaj Dhar - 17.01.2023 16:10

"set -o vi" was the solution to all my miseries and it's been so many years I didn't know that.

Ответить
B
B - 16.10.2022 18:59

First and foremost, thank you very much for your videos!! Been a longtime Mint/Manjaro & Openbox user and your videos gave me the courage to jump toward vanilla Arch.

Thanks to your various and in-depth info, I now have a customized AwesomeWM to my satisfaction and I am now setting the terminal to vi mode. I just finished updating my vimrc file and talk about perfect timing...

probably nothing, but my 2 cents regarding 'clear' for clearing TERM screen....... =)
I've been using an alias 'clr' for 30 years as my pseudo <ctrl + l> solution

still same 3-stroke keys, visual confirmation, and works whether ur in emacs & vi mode.

Once again, thank you very much for your hard works.
Cheers,

Ответить
LMNTS
LMNTS - 25.08.2022 01:14

Its sudO not sudu.

Ответить
Poe Lemic
Poe Lemic - 19.08.2022 06:39

Thank you for covering this. I learned that stuff in school, but I had forgotten so much of it. And, being a Windows user mainly, kindof dumbs me down. I just use arrow keys & only few extras.

Ответить
13th Raven Purple
13th Raven Purple - 17.08.2022 07:49

Great work 🥳🥳🥳 Thank you 💜💜💜

Ответить
Leonz
Leonz - 02.08.2022 16:37

You should try to put the keys pressed on screen.

Ответить
Vitor Melo
Vitor Melo - 30.07.2022 21:11

I use c-w, c-u every time, anybody knows if exist a command to clear all line in any position? Like Esc in Prompt Command of Windows.
I don't know about Vi mode, is possible custom mapping?

Ответить
Luca Ferrari
Luca Ferrari - 29.07.2022 19:46

every time a vim user approaches me and tries to convince me how bad Emacs is, I ask back which shell he uses, and always it turns out it's Bash, and then I say "oh, well, you know Emacs keybindngs too!"

Ответить
Karol Jakusz-Gostomski
Karol Jakusz-Gostomski - 28.07.2022 18:57

Very useful :) thanks

Ответить
its fish
its fish - 28.07.2022 14:27

GVDT.

Ответить
Wantyapps
Wantyapps - 28.07.2022 01:38

Your kernel is very outdated

Ответить
John Allsup
John Allsup - 27.07.2022 23:03

A long time ago (though still in this galaxy), I used emacs. These days I'm a vim addict. But I tried vim keybindings for bash and ended up going back to the standard emacs ones.

Ответить
mike94560
mike94560 - 27.07.2022 18:37

When using the vi mode you are in the 'insert' mode at first. You must hit ESC to get out of that mode.

Ответить
Сергей Любимов
Сергей Любимов - 27.07.2022 18:24

For me Ctrl-u deletes whole line for some reason

Ответить
Виктор Шишкин
Виктор Шишкин - 27.07.2022 17:44

Could you explain copying/cutting and pasting text shortcuts? And these vim *, + registers, how to use them in a convenient way??

Ответить
Radio Teal Podcast
Radio Teal Podcast - 27.07.2022 16:39

Very Good Info in this video.

Ответить
Kevin Haferkamp
Kevin Haferkamp - 27.07.2022 14:11

O-M-F-G. Thanks, just thanks! I never questioned if there were keybindings...

Ответить
Mastergamer433
Mastergamer433 - 27.07.2022 10:34

Correction: Ctrl+y isn't undo. It is paste. But when you do Ctrl+u it also sets the text in the clipboard.

Ответить
CyperN077
CyperN077 - 27.07.2022 10:15

Hey DT this is a great video because I discovered my bindings are messed up. ALT-f doesn't do anything while all the other keybindings work?
Now I need to find the problem or else I'll be forced to use the arrow keys! SOMEBODY HELP!

Ответить
Олексій Карпов
Олексій Карпов - 27.07.2022 10:04

As always writing a comment to support the channel

Ответить
Mike Chappell
Mike Chappell - 27.07.2022 09:58

In Emacs mode ctrl-x ctrl-e opens an editor for the command line. There are times it is handy. It will use your system default editor or honor $EDITOR if set.

Ответить
Ass Whole
Ass Whole - 27.07.2022 09:09

Hey DT can you do a video on USBguard?

Ответить
Jonathon Wisnoski
Jonathon Wisnoski - 27.07.2022 05:13

can you just manually change the keys? I would not mind getting standard copy paste working, as well as just nuking 90% of the other keys. I like arrow keys, ctrl_arrow keys for by word (I might just change that to begingin/ending of line), then I would like a clear all text key, normal copy paste. ESC could be whatever <c-c>, stop I guess?

Ответить
Brad S
Brad S - 27.07.2022 05:09

Very helpful as a newbie

Ответить
gardenapple
gardenapple - 27.07.2022 03:32

Instead of configuring vi mode in Bash you could configure for many programs at once using .inputrc, it's a configuration file for the GNU readline library which is used for text prompts in many CLI tools, not just Bash but also Python interactive shell, etc. There are a bunch of config options but the basic one is "set editing-mode vi" in .inputrc which applies it to all programs at once! (Zsh does not use .inputrc and I don't think Fish does either, but Bash definitely does)

Ответить
Cathal OGrady
Cathal OGrady - 27.07.2022 02:16

just a note ^ brings you to the start of text , 0 brings you to the actual start of the line regardless of leading whitespace or tabs

Ответить
Phydoux
Phydoux - 27.07.2022 02:15

Curious, will this work during a command line installer for say Arch or Gentoo? I'm always having to change a misspelled package when I'm installing all of my packages during an Arch install. Can I go back word by word and fix the error(s) using these keybindings?

Ответить
Cathal OGrady
Cathal OGrady - 27.07.2022 02:08

ctrl + l works with zsh in vim mode btw

Ответить
Nacho Plays
Nacho Plays - 27.07.2022 01:09

Me pinkies start hurting every time I hear "Emacs keybindings"

Ответить
Fsociety
Fsociety - 27.07.2022 00:41

.

Ответить
Rodrigo Cortés
Rodrigo Cortés - 26.07.2022 23:50

Nice video, thank you for that. Is there any key binding for scrolling?

Ответить
Kevyyar
Kevyyar - 26.07.2022 23:49

Would be nice to configure any terminal to use vim key bindings

Ответить
rafalg87
rafalg87 - 26.07.2022 23:13

Moving or deleting by words is sometimes a little unpredictable, for instance it might be that dashes are considered a word boundary and underscores aren't.

So, I sometimes fall back to moving/deleting by individual characters, which can be vastly improved by configuring your OS's key repeat settings. You can do that from your DE's settings UI or from the command line, for instance in Gnome you'd run:

gsettings set org.gnome.desktop.peripherals.keyboard delay 250
gsettings set org.gnome.desktop.peripherals.keyboard repeat-interval 25

Bear in mind it affects everything, not just the terminal. But once you try it I don't think you'll want to go back.

Ответить
Stephan
Stephan - 26.07.2022 22:30

Ctrl+L works in normal mode with vi bindings. Use Ctrl+Alt+L in insert mode.

Ответить
Elder Manhanini Fouraux
Elder Manhanini Fouraux - 26.07.2022 22:02

I would like to propose you a subject for your channel: Window Managers that run on Wayland! I know you already talked about Sway here, but I would like you to comment on others, like Wayfire, Hyprland, River, etc.That's if you can and when you can too...

Ответить
Rodrigo Polo
Rodrigo Polo - 26.07.2022 21:48

1. In macOS Terminal, in the options->Profile tab, enable the checkbox "Use Option as Meta key" to have this keybindings.
2. I just want to thank you for this content and channel, I though I knew how to use the terminal until I saw your content, which is like a glass of water in a desert.

Ответить
Phyrick Flame
Phyrick Flame - 26.07.2022 21:28

I've been using a lot of emacs bindings without knowing their origin. It is very nice to know such things and also be aware of options (like `set -o vi`) in order to change them. This will permanently influence how I work with the shell, thank you very much.

Also I'm checking out the emacs video right now^^

Ответить
Michał Kozioł
Michał Kozioł - 26.07.2022 21:10

In vi mode use '_' character in normal mode to get the last parameter of the last command. You can also use the numbers before to get the argument of the specific number.

Ответить
Marek Tomczewski
Marek Tomczewski - 26.07.2022 21:05

I know and use some of these key bindings for many years. I still learnt new and useful ones from your short video.

Ответить
Martin van den Broek
Martin van den Broek - 26.07.2022 20:46

Apart from the attention given to vi keybindings this was a great video. Mind you that quite a lot of appliances ( Cisco, Arista, Fortigate etc. etc. ) also use these key bindings, i.e. the EMACS key bindings 😋

Ответить
Oerjan 'Aliens' Snell
Oerjan 'Aliens' Snell - 26.07.2022 20:37

For beginning of the line and end, you can also use 'home' and 'end'.
But this might already be setup somewhere that I don't know about

Ответить
elemit
elemit - 26.07.2022 20:36

Hey DT, you have a broken Audacium link in the description, apparently they've moved to other website 😃

Ответить
SprtWlf9
SprtWlf9 - 26.07.2022 20:17

This is super helpful. Thanks DT!

Ответить
♣faustroll♠
♣faustroll♠ - 26.07.2022 19:55

Weird binding?
You know what really weird is?

Enter to copy.
(anyone knows which shell is using it?)

Ответить
Roman Y
Roman Y - 26.07.2022 19:37

Ctrl+Y is not weird. "Y" stands for "yank", when you are yanking back what you just deleted.

Ответить
SylvesterInk
SylvesterInk - 26.07.2022 19:29

ctrl-r allows you to search for a previous command in your history.

Ответить
csehszlovakze
csehszlovakze - 26.07.2022 19:16

Latte has been discontinued! The author shared the bad news on their website and on r/kde

Ответить
Stian
Stian - 26.07.2022 18:24

Oh no I am used to emacs standards, very useful to know!

Ответить