Re: Bye, bye, bash
- In reply to: Kurt Hackenberg : "Re: Bye, bye, bash"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 29 Mar 2023 02:14:43 UTC
> ---------------------------------------- > From: Kurt Hackenberg <kh@panix.com> > Date: Mar 27, 2023, 8:13:32 PM > To: <questions@freebsd.org> > Subject: Re: Bye, bye, bash > > > On Sun, Mar 26, 2023 at 01:55:15AM +0100, Sysadmin Lists wrote: > > >I find most people don't even know some of the features in bash exist. > > > >Just a few: > > Commands for Manipulating the History > > yank-nth-arg (M-C-y) > ... > > Xterm has ways to make Alt-as-Meta work, but it gets complex. There are > several settings and the "locale", which all interact, and bash and > Emacs also have settings and locale. See the documentation. > > You could try xterm's main menu setting "Meta Sends Escape", and its > corresponding resource metaSendsEscape. That might work. > > I don't know about other terminal emulators. > I simply disable the interception of the Alt key in the xfce4-terminal settings: Edit -> Preferences -> Advanced -> Shortcuts -> Disable all menu access keys My biggest problem with sh is the way it handles killing and yanking of words verses WORDS, and its limited kill buffer. On bash, 'cd /path/to/dir Ctrl-W' deletes the directory string and stores it whole in the kill buffer. On sh, it kills the entire line and stores it in the kill buffer. On bash, 'cd /path/to/dir Alt-Backspace' deletes each portion of the directory string and stores it in the buffer. Same on sh, except sh doesn't allow cycling through the kill buffer to re-paste to something like 'cd /path/dir' There's better command line navigation and editing than: cd;ls;cd;ls;cd;ls; vim file[ENTER] It's more efficient to instead do: ls /L1/[TAB][TAB]L2/[TAB][TAB]L3/[TAB][TAB]file; vim Alt-.[ENTER] Bash evens allows you to yank a long filename with its path from a previous command with: grep 'foo" !?[string-in-name]?:% | sort -- Sent with https://mailfence.com Secure and private email