From nobody Wed Mar 29 02:14:43 2023 X-Original-To: questions@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PmVVv6yJYz41mQ1 for ; Wed, 29 Mar 2023 02:14:47 +0000 (UTC) (envelope-from sysadmin.lists@mailfence.com) Received: from wilbur.contactoffice.com (wilbur.contactoffice.com [212.3.242.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4PmVVv4GQmz3wP3 for ; Wed, 29 Mar 2023 02:14:47 +0000 (UTC) (envelope-from sysadmin.lists@mailfence.com) Authentication-Results: mx1.freebsd.org; none Received: from ichabod.co-bxl (ichabod.co-bxl [10.2.0.36]) by wilbur.contactoffice.com (Postfix) with ESMTP id 7EE3F1BDE; Wed, 29 Mar 2023 04:14:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1680056084; s=20210208-e7xh; d=mailfence.com; i=sysadmin.lists@mailfence.com; h=Date:From:To:Message-ID:In-Reply-To:References:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding:Cc; l=1924; bh=lXZsf3y/o/chQqAlgn2TmjM8fYFXuBx27spCy0TgyP0=; b=eyRfCG+b5YURqbZGXJyqVFuZ/evdq/PSEzr9uDGmdSz9Tbe7vbNPZE3WtT1sAc1T FiwLCS2StBDY/Ai4onfC6x3Vi+q5+8wcM/RO3l/dwPekxjpH6/LuzAtL7xHwFgccTEM VG78I30pEsueZ1/2I8RYuQjlut/nKyLU4hdovVmXaFgL8SV2CfMMOO61kg2dRYh9+19 u/XdQJCBjOV4TAmpG0pIvLNLweMi4bkiWOVg9iZQ7A1225NQRuzRWc7hGJb5yiun64r qXY8SORLR8Y4xSBj39jiEP+VCKOPYTbcUbAJwMzDdCzYWHu1UmWgfXn4yCzvb1IR7nx jKa/qmlbaw== Date: Wed, 29 Mar 2023 04:14:43 +0200 (CEST) From: Sysadmin Lists To: questions@freebsd.org Message-ID: <750269221.204514.1680056081887@ichabod.co-bxl> In-Reply-To: References: <585369190.19119.1679792115567@ichabod.co-bxl> Subject: Re: Bye, bye, bash List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Kurt Hackenberg X-Mailer: ContactOffice Mail X-ContactOffice-Account: com:312482426 X-Rspamd-Queue-Id: 4PmVVv4GQmz3wP3 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:10753, ipnet:212.3.242.64/26, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N > ---------------------------------------- > From: Kurt Hackenberg > Date: Mar 27, 2023, 8:13:32 PM > To: > 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