From nobody Sun Mar 26 00:55:15 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 4Pkctd43Xtz41xrn for ; Sun, 26 Mar 2023 00:55:21 +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 4Pkctd1B92z4LQh for ; Sun, 26 Mar 2023 00:55:21 +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 201C3AB5; Sun, 26 Mar 2023 01:55:18 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1679792118; 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=4202; bh=duwLaYJvrklwVN0N9bG6Zo3nD9yND2zNriQB2ISmdDY=; b=Lhf5LgOU2yXeGfQS/ZqaS3hiOk4em/ks1nBUIWHQH0a2laT0yuwwRG+9K/7tCbE+ 3PwICbjoky8v2bdXycyYlxsLxjurTe1Syy8UIT9WAXy80EWq90N2+JuDC7KqcXu0BIt 6Ait+JdvOT+DIWkEA8QE/N/c7BBR8W/JYGg0Du69QEAKy5jzp9utSY0dhNx1z5wLrOt EcLL1V07kxhhrESDPKD62C35g6REGf7E/nKA7/m4dlpWQwbxtGTHTbf/Au3ghlPhNzA 0SUCnxK7Y6fERi9B+NQ9t+9tcKwRBiA7h0Q+hGWqglpjqo5Qpwv/GOqg9qaHa+LubJ8 DLA+L/apoA== Date: Sun, 26 Mar 2023 01:55:15 +0100 (CET) From: Sysadmin Lists To: freebsd-questions@freebsd.org Message-ID: <585369190.19119.1679792115567@ichabod.co-bxl> In-Reply-To: References: 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: Christian Weisgerber X-Mailer: ContactOffice Mail X-ContactOffice-Account: com:312482426 X-Rspamd-Queue-Id: 4Pkctd1B92z4LQh 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: 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