From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 7406 invoked from network); 13 Feb 2023 07:36:41 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 13 Feb 2023 07:36:41 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1676273801; b=evZr9ztpnsfyEQQCbieZ2eCdQeErzeDEEXfQoANkLefx6akM1rWiOuGEqLrI6keEicB/YtXl5m EbLJXngfmebzjnTHWKgETkZD5rTrVKPbNA8EwZJB/0DnBqmnysL+DHsGVryP+YWVBFUfPX7bPk 9K0R5r7VSOn36Uxa7yeBL6GiKZ1HFbBMY1oFpZlWmKpMGGqnWqVTPjXLHMvV+dCJaHQEaxux6y FQluh0FNam9Zd1rxmE+2egc5i2Vsr1i2fKJ6lXqTpglzjQ8EVE64S+xqG4AeEJyeUKRfpEV2H8 Ba35R+YTIOh/U5XeWb3RD88fVo2HPuIMp+VJNB2KLXrvnw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-vs1-f48.google.com) smtp.remote-ip=209.85.217.48; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1676273801; bh=6McC8nuUMDKWKQPg+BOzWSFd9u1wHY0uItPxxbW5bfs=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:To:Subject:Message-ID:Date:From:MIME-Version: DKIM-Signature:DKIM-Signature; b=EQ0kUk1GduI9CmPC2GuD7lgNcja41L/g08fL4rJnyBuCzkFk9L624pQOidmqxb5x0eVkKbQet9 opglDxm2SHY2tXbBrMeIAMAtFDtUPe+vadC4tnWS21H13qqyLCw6l+2BkPMr0RA2cfFplopDK7 IArkd/IVsThPP5tWOgScnBdPwTHMEcXG3TKZTDZzyWL8zcsNYhP4S3XjfRVtJBZv4hbd2H6Ev2 TnO0oEpP+AE3l+rQWOF5RtvEfEaMGn8IeONDm/3wRElmGcuaGD8lzBZz+Fn1CUHYuAQFe17vIa oRBqVTwL4tnTBC2wd5OZ7t+4SZm3zoaANDXozDDFTwZ94g==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:To:Subject:Message-ID: Date:From:MIME-Version:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References; bh=guSQwMU1KJe/u0YzLDl+4RwHlADyQM0ncw3d9UsJYBk=; b=h8zNrWnZ+ZOpa5Tekk2F2fdFvr adDfDHPg28gJYFbjRwBHmg+vraZMK12WMiuQl2RYvevl68L3BwoO0eHIb0tCNk5oaiWGtKa0X4UQO jEvFksuYvhU3J7yRX7rqTjVvtl8A2GjkTjmMDQ+m9faCzQzP70W+m8UsEqU3Ju6Nb0UdncCyi9Tm8 sdG0FMo9f3RuIg3nxNxHqkwYsuPbOC2PR7xN/Em6k5l/iXDE/fuo4kBvGfapsiKNKaden/PO1XzSO pAmMOg3jUqjfolT9bYCRXkS7b7M44QCuWhF67MjQZuQZK6Kdx9nzq9jBPPHzTBHKKd6bhdGVM+Oxa pm5E+wlg==; Received: by zero.zsh.org with local id 1pRTOC-000Mlx-Pg; Mon, 13 Feb 2023 07:36:40 +0000 Authentication-Results: zsh.org; iprev=pass (mail-vs1-f48.google.com) smtp.remote-ip=209.85.217.48; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-vs1-f48.google.com ([209.85.217.48]:45738) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1pRTNP-000M6r-Ay; Mon, 13 Feb 2023 07:35:51 +0000 Received: by mail-vs1-f48.google.com with SMTP id z15so1518534vsj.12 for ; Sun, 12 Feb 2023 23:35:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=guSQwMU1KJe/u0YzLDl+4RwHlADyQM0ncw3d9UsJYBk=; b=nFNTVbWbC3mI57DcWeoO7u3LHr/ndjvg5HgM9jAuDsW98AO9b+xS4o3P1QPOW+LszW auQiwr9Uqu4cLsZFDYATeGS9wonZFKe0vAkvy5RJUYUhHOBzY1IHmBxvkkoD7Eluic2z wLUsoMB5v5gmW9bnVf+GgK92vX6aBHwpGhqOAdLB99WS8pjgGXdq14Lni2U2IwfQ7gXB vA7cXmAhhWZQIBtobNbASi5b4DDxLQHToFDu7GY++jh6m8Z2xm/RRNyeajUnttNkroWG Wj2M0HQOQQ2uXTd8IsSCqZlbdaUo83fbidnuoMI03/V+Gq7P51JUlqZKXX21W/qExegA Kf4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=guSQwMU1KJe/u0YzLDl+4RwHlADyQM0ncw3d9UsJYBk=; b=rTljc24kfH0OW/CY1laSwquim4CzgURffxfUyBVGeIjTwufo4oBluB2VfyHtvQrqae UL34oJcdIoj9AGYzAIpzgrKxL7yh3mxg27Lp760yrr8cIalwp/0UfFjR3PSozWlTWczw abFwdC87aSjgeo0Vq3xOgw1ouhI4ZBeLem3EMoMkWo4xj8wsYGjN9Qh9pqemoFtFeYSx ZYGUon+GMwW5K1UTn/QY7ifb1aLIV+dYzHVlnY9yczVSAQgJEFrE7dELBaCgkP9IR1pP HSshrKsY6xR6JrgpXWRlwKS/oz5RlBJBV2qpIk7mGUkhO4+/afkU5Iql4psyjJd6OwLt ktBw== X-Gm-Message-State: AO0yUKU9DMBrzYgz5AuV9r8l5BWd+UhcP1GdgoGsuz8ketRzdco5pLDR ukOeODWNn6PY46ct2bBSTbnSFYjdcmcJYVJIsq4EqqBfRmY= X-Google-Smtp-Source: AK7set/03K2WWXGBksa69uVlmdq9BrSiOME8RpHYW9+8OG8w1l5lyuFCT6n45qDUhc6bcpGcLd1q30WLxSh4HEdBSs4= X-Received: by 2002:a67:c985:0:b0:3fa:6af6:fddd with SMTP id y5-20020a67c985000000b003fa6af6fdddmr3888487vsk.70.1676273749881; Sun, 12 Feb 2023 23:35:49 -0800 (PST) MIME-Version: 1.0 From: OG Code Poet Date: Sun, 12 Feb 2023 23:35:39 -0800 Message-ID: Subject: Read/write multiple histories from non-interactive shell To: zsh-users@zsh.org Content-Type: multipart/alternative; boundary="00000000000068794505f48fe52d" X-Seq: 28934 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: --00000000000068794505f48fe52d Content-Type: text/plain; charset="UTF-8" Let's say there is a non-interactive script with multiple form fields (each with a different vared), and a user can enter the form multiple times. I want to preserve individual history for each form field. There are two possibilities: 1. Keep history internal to the script I couldn't find an interface for this. Doing ``fc -p`` once in the beginning of script does provide an internal history, but it is shared between all vareds (which is not ideal). 2. Keep history external to the script Not all ``fc`` commands work. ``fc -R`` does read correctly from external history files. But ``print -s``, ``fc-W`` and ``fc -A`` do not. Seems the only option is to do an echo "$string" >>~/path//form_entry_1.hist file. But I guess that has disadvantages because it lacks the benefits that zsh provides in resolving duplicates. Is there a way out? Should this also be copied to zsh-workers for feature request? Thanks! P.S. I can be slow to respond. --00000000000068794505f48fe52d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Let's say there is a non-interactive script with = multiple form fields (each with a different vared), and a user can enter th= e form multiple times. I want to preserve individual=C2=A0history=C2=A0for = each form field.

There are two possibilities:=C2= =A0

1. Keep history internal to the script
=C2=A0 =C2=A0 =C2=A0 =C2=A0 I couldn't find an interface for this. D= oing=C2=A0``fc -p`` once in the beginning of script does provide an interna= l history, but it is shared between all vareds=C2=A0(which is not ideal).
2. Keep history external to the script
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 Not all ``fc`` commands work. ``fc -R`` does read correctly from= external history files. But ``print -s``, ``fc-W`` and ``fc -A`` do not. S= eems the only option is to do an echo "$string" >>~/path//f= orm_entry_1.hist file. But I guess that has disadvantages because it lacks = the benefits that zsh provides in resolving=C2=A0duplicates.

=
Is there a way out? Should this also be copied to zsh-workers fo= r feature request?

Thanks!

P.S. I can=C2=A0be slow to respond.
--00000000000068794505f48fe52d--