5 bash tricks to make you a cooler programmer
Vložit
- čas přidán 31. 08. 2020
- Why be a junior analyst when you could be a senior software engineer with a few simple bash tricks??
Find out more about this other Unix commands using your system's "man" command.
Music: "Straight" from www.bensound.com - Hry
The cow was very convincing 😁 so I subscribed
Great video
#1 is from your emulator not bash, what you have to do is hit ctrl+u to kill the line, do whatever you need to do then hit ctrl+y to yank the line back
The behavior is up to the shell, not the emulator. Dash, for example, won't do anything interesting if you type Alt-Shift-3 (i.e. Meta-#), and neither does tcsh (at least with my default config). This works out-of-the-box on ksh/fish, but zsh requires that you `setopt interactive_comments`.
That specific command is only for a US keyboard. On a UK keyboard we actually have a hash key that isn't hidden behind the number 3 although this shortcut still doesn't work using WSL2 on Windows so I'd be inclined to think Capuno was right. Your personal setup has that bash function mapped to that keypress.
The alternative is to press ctrl+a to go to the start of the line where you can type the # yourself, then ctrl+e to go gto the end of the line if you need to.