From nobody Sun Mar 26 01:02:16 2023 X-Original-To: freebsd-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 4Pkd2k3TCHz42075 for ; Sun, 26 Mar 2023 01:02:22 +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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Pkd2j5Rf4z4MXV for ; Sun, 26 Mar 2023 01:02:21 +0000 (UTC) (envelope-from sysadmin.lists@mailfence.com) Authentication-Results: mx1.freebsd.org; dkim=fail ("body hash did not verify") header.d=mailfence.com header.s=20210208-e7xh header.b=f3R81LvS; spf=pass (mx1.freebsd.org: domain of sysadmin.lists@mailfence.com designates 212.3.242.68 as permitted sender) smtp.mailfrom=sysadmin.lists@mailfence.com; dmarc=pass (policy=quarantine) header.from=mailfence.com Received: from ichabod.co-bxl (ichabod.co-bxl [10.2.0.36]) by wilbur.contactoffice.com (Postfix) with ESMTP id B4C47C4E; Sun, 26 Mar 2023 03:02:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1679792540; s=20210208-e7xh; d=mailfence.com; i=sysadmin.lists@mailfence.com; h=Date:From:To:Cc:Message-ID:In-Reply-To:References:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding; l=4936; bh=b/otcfsMhmjtblCwXX/baSC7fdwUnugYjIFJPQPE/xU=; b=f3R81LvSiHm3tHFzAYqg5G4MztA2iKINCLQifhvjcRYilI3CslM7ysYS0uFL1wBC WFWDlWnhcDxgHlGaUdDtIJc9WBlMgBF8nnGpmzng9lMI16+TJhxKa1X39mf8VD8VSAC yvJNb6Ft+rMHkBgh86ILWQr21nDQn/ZzOMIkmjtrC4IumvoqBbEWV3ouCnIdLJuSOHW mI9EPe8wCFILCy/ysKwBl1e9g0mIA1Jp7CcciSmbvLW5EPN/PbkdfjXifOrOYYcuMNQ R8YwHqBofEVdH/dkfi3K5u20R3QNCvFgByXErmnGfUWrZ4BIcxUAizgXc+9voCPhoud bngUqify9g== Date: Sun, 26 Mar 2023 03:02:16 +0200 (CEST) From: Sysadmin Lists To: freebsd-questions@freebsd.org Cc: Christian Weisgerber Message-ID: <931559867.19676.1679792536786@ichabod.co-bxl> In-Reply-To: <585369190.19119.1679792115567@ichabod.co-bxl> 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 X-Mailer: ContactOffice Mail X-ContactOffice-Account: com:312482426 X-Spamd-Result: default: False [-2.90 / 15.00]; NEURAL_HAM_SHORT(-1.00)[-0.995]; NEURAL_HAM_MEDIUM(-0.90)[-0.898]; DMARC_POLICY_ALLOW_WITH_FAILURES(-0.50)[]; R_SPF_ALLOW(-0.20)[+ip4:212.3.242.64/26]; NEURAL_HAM_LONG(-0.12)[-0.120]; MIME_GOOD(-0.10)[text/plain]; RCVD_IN_DNSWL_LOW(-0.10)[212.3.242.68:from]; XM_UA_NO_VERSION(0.01)[]; ASN(0.00)[asn:10753, ipnet:212.3.242.64/26, country:US]; MLMMJ_DEST(0.00)[freebsd-questions@freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; DKIM_TRACE(0.00)[mailfence.com:-]; RCPT_COUNT_TWO(0.00)[2]; TO_DN_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; DMARC_POLICY_ALLOW(0.00)[mailfence.com,quarantine]; R_DKIM_REJECT(0.00)[mailfence.com:s=20210208-e7xh]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_SOME(0.00)[]; ARC_NA(0.00)[] X-Rspamd-Queue-Id: 4Pkd2j5Rf4z4MXV X-Spamd-Bar: -- X-ThisMailContainsUnwantedMimeParts: N > ---------------------------------------- > From: Sysadmin Lists > Date: Mar 25, 2023, 5:55:15 PM > To: > Cc: Christian Weisgerber > Subject: Re: Bye, bye, bash > > > > ---------------------------------------- > > From: Christian Weisgerber > > Date: Mar 25, 2023, 3:18:34 PM > > To: > > Subject: Bye, bye, bash > > > > [...] although I use approximately 0% of bash's bloated > > feature set. > > > > Bash certainly has its problems, but sh's interactive feature set is primitive. > 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) > Insert the first argument to the previous command (usually the > second word on the previous line) at point. With an argument n, > insert the nth word from the previous command (the words in the > previous command begin with word 0). A negative argument > inserts the nth word from the end of the previous command. Once > the argument n is computed, the argument is extracted as if the > "!n" history expansion had been specified. > yank-last-arg (M-., M-_) > Insert the last argument to the previous command (the last word > of the previous history entry). With a numeric argument, behave > exactly like yank-nth-arg. Successive calls to yank-last-arg > move back through the history list, inserting the last word (or > the word specified by the argument to the first call) of each > line in turn. Any numeric argument supplied to these successive > calls determines the direction to move through the history. A > negative argument switches the direction through the history > (back or forward). The history expansion facilities are used to > extract the last word, as if the "!$" history expansion had been > specified. > shell-expand-line (M-C-e) > Expand the line as the shell does. This performs alias and > history expansion as well as all of the shell word expansions. > See HISTORY EXPANSION below for a description of history > expansion. > history-expand-line (M-^) > Perform history expansion on the current line. See HISTORY > EXPANSION below for a description of history expansion. > > Killing and Yanking > yank (C-y) > Yank the top of the kill ring into the buffer at point. > yank-pop (M-y) > Rotate the kill ring, and yank the new top. Only works > following yank or yank-pop. > > Completing > possible-completions (M-?) > List the possible completions of the text before point. > insert-completions (M-*) > Insert all completions of the text before point that would have > been generated by possible-completions. > complete-into-braces (M-{) > Perform filename completion and insert the list of possible > completions enclosed within braces so the list is available to > the shell (see Brace Expansion above). > > Miscellaneous > insert-comment (M-#) > Without a numeric argument, the value of the readline > comment-begin variable is inserted at the beginning of the > current line. If a numeric argument is supplied, this command > acts as a toggle: if the characters at the beginning of the line > do not match the value of comment-begin, the value is inserted, > otherwise the characters in comment-begin are deleted from the > beginning of the line. In either case, the line is accepted as > if a newline had been typed. The default value of comment-begin > causes this command to make the current line a shell comment. > If a numeric argument causes the comment character to be > removed, the line will be executed by the shell. > glob-expand-word (C-x *) > The word before point is treated as a pattern for pathname > expansion, and the list of matching filenames is inserted, > replacing the word. If a numeric argument is supplied, an > asterisk is appended before pathname expansion. > glob-list-expansions (C-x g) > The list of expansions that would have been generated by > glob-expand-word is displayed, and the line is redrawn. If a > numeric argument is supplied, an asterisk is appended before > pathname expansion. > > > And pretty much all of the 'HISTORY EXPANSION' section. > > I use those features daily, but have watched career-long sysadmins wear out > their arrow keys as they navigate the command line. If efficiency is key, those > features make working on the command line a breeze. > > > -- > Sent with https://mailfence.com > Secure and private email > Forgot a couple other essentials: Miscellaneous undo (C-_, C-x C-u) Incremental undo, separately remembered for each line. revert-line (M-r) Undo all changes made to this line. This is like executing the undo command enough times to return the line to its initial state. -- Sent with https://mailfence.com Secure and private email