Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Mar 2023 04:14:43 +0200 (CEST)
From:      Sysadmin Lists <sysadmin.lists@mailfence.com>
To:        questions@freebsd.org
Cc:        Kurt Hackenberg <kh@panix.com>
Subject:   Re: Bye, bye, bash
Message-ID:  <750269221.204514.1680056081887@ichabod.co-bxl>
In-Reply-To: <ZCJbXPVsZBkq4wR7@rain.cave>
References:  <ZB9zOtaYCdUSoXcs@lorvorc.mips.inka.de> <585369190.19119.1679792115567@ichabod.co-bxl> <ZCJbXPVsZBkq4wR7@rain.cave>

next in thread | previous in thread | raw e-mail | index | archive | help
> ----------------------------------------
> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?750269221.204514.1680056081887>