From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Arsen =?utf-8?Q?Arsenovi=C4=87?= via Emacs news and miscellaneous discussions outside the scope of other Emacs mailing lists Newsgroups: gmane.emacs.tangents Subject: Re: [OT] Not clobbering bash history Date: Thu, 07 Dec 2023 14:06:38 +0100 Message-ID: <874jgub1gn.fsf@aarsen.me> References: <87wmufm7r7.fsf@catern.com> <87fs12jkik.fsf@yahoo.com> <87ttphlqlo.fsf@catern.com> <87v89ujwa6.fsf@aarsen.me> <86il5g9qs9.fsf@aarsen.me> <864jgy85g5.fsf@aarsen.me> Reply-To: Arsen =?utf-8?Q?Arsenovi=C4=87?= Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3756198020233115301==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20952"; mail-complaints-to="usenet@ciao.gmane.io" Cc: brickviking@gmail.com, sbaugh@catern.com, luangruo@yahoo.com, emacs-tangents@gnu.org To: rms@gnu.org Original-X-From: emacs-tangents-bounces+get-emacs-tangents=m.gmane-mx.org@gnu.org Thu Dec 07 14:13:37 2023 Return-path: Envelope-to: get-emacs-tangents@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rBEC8-0005EE-PM for get-emacs-tangents@m.gmane-mx.org; Thu, 07 Dec 2023 14:13:36 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rBEBw-0008I1-Rg; Thu, 07 Dec 2023 08:13:25 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rBEBt-0008Hp-5o for emacs-tangents@gnu.org; Thu, 07 Dec 2023 08:13:21 -0500 Original-Received: from mout-p-202.mailbox.org ([80.241.56.172]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1rBEBl-0005fB-4R; Thu, 07 Dec 2023 08:13:20 -0500 Original-Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:b231:465::1]) (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) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4SmF7b5wSVz9scS; Thu, 7 Dec 2023 14:12:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aarsen.me; s=MBO0001; t=1701954779; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=5Mazz80UcyeSQpOEj6M6JKfUlzz/mGiWm5PTptx9xJg=; b=Pn8QIF/m84zzJtdW5EDOfi50bpgU7s0kP9+iKJ+zEaRFULypTp0+6rvjj2M5OqLQaYb2xP KhZTnTb6vj0h+qumoXc8STEpeWhI0UKoILLtLmnTvmrOaIU8Dl9DllzbQMxd200ksnx20Y N9DG/JxEvw6OAvs2JdY9MFTpt9yeWcfqs+o0G7VKTs+mDbdQdSvCu8Dxc9lkOQmOwE5LMH 1g5Csw40RwXsA1LOxV+Wy7Knk5frLaE45WRT7WGv02zrW1HSYcTqd6dE8PbSpTKbN32PX4 xRUikW6WOd6mDLG318RiC0J2mLTLVWJ43E9Crm2n7RPP7tepibmCVHuRzx3MRQ== In-reply-to: X-Rspamd-Queue-Id: 4SmF7b5wSVz9scS Received-SPF: pass client-ip=80.241.56.172; envelope-from=arsen@aarsen.me; helo=mout-p-202.mailbox.org X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-tangents@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Emacs news and miscellaneous discussions outside the scope of other Emacs mailing lists List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-tangents-bounces+get-emacs-tangents=m.gmane-mx.org@gnu.org Original-Sender: emacs-tangents-bounces+get-emacs-tangents=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.tangents:1138 Archived-At: --===============3756198020233115301== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Richard Stallman writes: > [[[ To any NSA and FBI agents reading my email: please consider ]]] > [[[ whether defending the US Constitution against all enemies, ]]] > [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > > I moved this to emacs-tangents because thus isn't really about Emacs, > but I don't know of a Bash list to use. Is there one? IIRC there's bug-bash and it accepts patches, so it is perhaps also appropriate for topics like this one. > > Say that the history has eight entries, and a ninth was added by a > > parallel process, the current process would be at the point after the > > eighth element and should continue reading from there next time it wa= nts > > a history entry. > > Are you saying that multiple Bash processes in parallel should share > one single history, which would contain all the commands the user > entered in any of these processes? Yes. Opinions vary on this, but I have a workflow which relies on this (via a hack I put in my bashrc and found ages ago). > So the commands of Basb process A and those of Basb process B would be > interspersed in the history? And as you go forward and back in the > history in Bash process B, you would see A's commands and B's commands > in chronological order? Yes. ZSH does implement this well IME (but I haven't used ZSH extensively.. so I'm not sure if I'd run into trouble with it). > That makes a kind of sense, but what I would envision is that each > Bash process has its own history with only the commands of that process. Some do prefer that. It'd be reasonable to do that by default, as it's currently the default. > Why do you prefer the shared history file approach > to the one-history-per-process approach? Because I rely on working in many, many interactive shells in parallel. Though, on that note, it is perhaps reasonable to flip 'histappend' to on by default, even if nothing else changes (because otherwise history is lost since only the last shells history is kept). Thanks, have a lovely day. =2D-=20 Arsen Arsenovi=C4=87 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIYEARYKAC4WIQT+4rPRE/wAoxYtYGFSwpQwHqLEkwUCZXHE2BAcYXJzZW5AYWFy c2VuLm1lAAoJEFLClDAeosSTweoBAK0t6qZho6S/C12DuaNRVgc39cnoM5dWJCkF TkbumDZuAPsGRVW08zNJICKMQCnq5o95gTPBgmYbDpTeorrCIeDBBQ== =xZCB -----END PGP SIGNATURE----- --=-=-=-- --===============3756198020233115301== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline LS0tCnZpYSBlbWFjcy10YW5nZW50cyBtYWlsaW5nIGxpc3QgKGh0dHBzOi8vbGlzdHMuZ251Lm9y Zy9tYWlsbWFuL2xpc3RpbmZvL2VtYWNzLXRhbmdlbnRzKQo= --===============3756198020233115301==--