From nobody Wed Oct 12 09:14:02 2022 X-Original-To: dev-commits-src-all@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 4MnRmB6VLSz4fpn4; Wed, 12 Oct 2022 09:14:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MnRmB5wXdz3cxl; Wed, 12 Oct 2022 09:14:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665566042; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5UPvYI/LpZ5LqD++1j2bH+MABYy9UdFr/IgKB9RwOFU=; b=U6oonlmyxi1LhZ0/W+oaRa1COlPbk+iUjOtM12SnszBivqmgu/dJc8IjP6+i/9HaHwOO/x 3Ep6NhkRkK2gY45CkfkKEnYZRl9yQ6+8GDIuKeuYjU0WeJH7nHOzywm8A/SQum4RB21r70 aMzlBwaDXH4iWpF/zUEqMQYLDLYMrfDp/gimPvv0VvDanOhp+hlmvB9upSiZBJoad+JBbD fCJlK4P3Z4dcLgFN8DyFnLEzJV42S3wcuW3BB+P19TjukbGMz9LA6HbASrZ5Q8BjVVjiqK Z4ow1rS3ijWqppWcMDphZF6AAonTXwXgc72NxDLC3l9sUgPpZzBgYU+xJPAGmA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4MnRmB4xv9z1GLg; Wed, 12 Oct 2022 09:14:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 29C9E2KM043983; Wed, 12 Oct 2022 09:14:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 29C9E2fh043982; Wed, 12 Oct 2022 09:14:02 GMT (envelope-from git) Date: Wed, 12 Oct 2022 09:14:02 GMT Message-Id: <202210120914.29C9E2fh043982@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Baptiste Daroussin Subject: git: 89acef8476ca - stable/13 - sh(1): interactive mode improvement List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 89acef8476ca01dfebabe4ec7f25c82fb5660fbd Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665566042; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5UPvYI/LpZ5LqD++1j2bH+MABYy9UdFr/IgKB9RwOFU=; b=ng/G0WyDlq4LuS3RfhQsvdJAL/OWFxNIM+miQbykpzng/M2Z4CHifA77hd+M3wogNKRNRc bJAUr4GUNsaE7juATFGHy8qUu5vtne0t5FGzBLMgm3aeL5TpDNE41+z8OkqiJU5yLJdMt0 q7uU0Zolkn42iKmCcrt5Q6o6vYDteN7sf74hNni27PBmeXM8Ny4gzXzmK44T1llw0SAK6+ JJPTjQe4zmoCNDwJeQMSvW5othyP6kJ6pZwsYYdjpa4z9r6FBiz8UKYFMQ9OTOHalA2FR3 Y7Cu/bHNVR9ue6NrSb3hSd/yZIoKJ+b2xFQwrKfxxranGKSKOP/hBHLAeq/q1g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1665566042; a=rsa-sha256; cv=none; b=UAMg5UcBhKfkKuj4nWW0+CJTP17l4xHaA6VIzLXVapp8ADn8kuRDE+glsddtLTERwuDQkT XQ7WK6lekEMsS3rOnWum8XbxifgxbZFdDJTCteFKBoNoMPufGJ1o9QH2+hHonsMv7+XpDb fwJdPOZe+Y/jEdZ4fnfu2hRiJOfsP9oFnnytwp8s9JgYgruLRy5utM39vzdlsFkMwLBHnO WV41PBVoKtXV3iblftXkLkYi01R1jRLz9EfRj5YngDquJtb2X/nMDNs78KanOkeYe4oMse AIFw/FfAHA1pkyu1gBq7u3FtRLY9KoJOz4m6pYQy3J068aWY+AQ0XJB+UaJUEg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=89acef8476ca01dfebabe4ec7f25c82fb5660fbd commit 89acef8476ca01dfebabe4ec7f25c82fb5660fbd Author: Baptiste Daroussin AuthorDate: 2021-10-19 06:37:47 +0000 Commit: Baptiste Daroussin CommitDate: 2022-10-12 09:13:20 +0000 sh(1): interactive mode improvement In the default configuration add 2 bindings which has been requested by many during the HEADSUP discussion: * csh like arrow history navigation * ctrl-arrow to jump from word to words Add an alias to make the history command exist as an alias to fc -l. (cherry picked from commit ef0d94a3d34c880bd9f86cd842ee01b6075bc1d8) --- bin/sh/dot.shrc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/bin/sh/dot.shrc b/bin/sh/dot.shrc index 5277e5b07b0a..5a111a61a38d 100644 --- a/bin/sh/dot.shrc +++ b/bin/sh/dot.shrc @@ -31,6 +31,15 @@ # alias mv='mv -i' # alias rm='rm -i' +# # csh like history on arrow up and down +bind ^[[A ed-search-prev-history +bind ^[[B ed-search-next-history + +# # ctrl+arrow allow to jump from words to words +bind "\\e[1;5C" em-next-word +bind "\\e[1;5D" ed-prev-word +alias history='fc -l' + # read(2) of directories may not be desirable by default, as this will provoke # EISDIR errors from each directory encountered. # alias grep='grep -d skip'