From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: from zero.zsh.org (zero.zsh.org [IPv6:2a02:898:31:0:48:4558:7a:7368]) by inbox.vuxu.org (Postfix) with ESMTP id B709F308D6 for ; Mon, 28 Oct 2024 18:35:58 +0100 (CET) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1730136958; b=TSR1mxmO/d9/bZVidSzBw5FHZge1pLwhjMH3cEEQnXogijku67NInm56BNsC2VfIzsmObWH5gI 2ra5+NAoWdI7nYepDoJKxyWzmRc9Dmgrx0VpIp69QUiD7SSJ/dKTO7RBZFAf6uHHcRnvqYVMdj V+ien0zQXtTF5irj7RddZYEOh+78AcfkXX30JPlamZ4KrAZqXuClnsGpaJrURhMnfVW/TWEyZj 2wdD0z+wDhIe6IbISs6ftVKjqQC518JVsWvYwdMx+LgVxYePGD6nE4W+pxQ5GM1l3gMBYEr+n/ Ha7QyFS8agke8Rr9EMJZ9wE2uTbYG3EezpRV3ZrxLJmzmw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-lj1-f182.google.com) smtp.remote-ip=209.85.208.182; dkim=pass header.d=gmail.com header.s=20230601 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=1730136958; bh=+RP6tbESpZV54fbBylQTxjMbl2p1mW8T0AbyPqd5S4Y=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:Cc:To:Subject: Message-ID:Date:From:In-Reply-To:References:MIME-Version:DKIM-Signature: DKIM-Signature; b=LNM/Px5L23HIwVJgDStXZWPXfLHHX22ZLfdeDwtw76E5T/2Mp4eECy7Pe3XegwGQbOL6lY83y1 qqltLtb7bP8s+sfKv2DC5oG86mCr+d8jSt5VJ8E4SY5L+wM2nO1cie+Fe7Juhm7CPdJXKtWJx7 nCHR7w4TQsD4zs9sIg3BSc3RhnxEumoTnh3mwgpWQTWxPfZ8kPSGqiNvPXDF88yX1hYo/qa4ap suFk6r/gvDsWLUF+Ftqmjcp/rvlvzwdJdYi5eKbJLChO3ebbyV0akRHu+4l7azevyfM9P9tZxM wJ4VWZS8bTNurd1qsXa5eGpJPLEUkFgdYpdqdMtSd0v/oA==; 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-Transfer-Encoding: Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To:References: MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=+RP6tbESpZV54fbBylQTxjMbl2p1mW8T0AbyPqd5S4Y=; b=YlfifivF6txW4tXjGp4mgXSORy t0HPu+hImrldqG3pK1ANx125gzxOYqq4/6qGy/5XOaYgc/kDIaNNIU0nRUPA3dICGv9S+AmqnAONh 9gB4hIBkYhgpLJ+ym6tbUrtsmMNqp2cNXeIJ4JcnUQBAObg1yZVUoPaYery8QMAW6Nhq7xCmoN4Xr NUvUjy3EvhGbGBIFz9sIuB9gUMmDZLeSLDE7YRb/7ZdtPj4wjauacPwS3WzbY6yB725JgPhOrnbQ7 GtJsBSD4ZNHaubjZUoOoYtBdrIHUT4psh4TSfgZtPiCwd/rbl03Gg4zuM9V76vfpSf/bksZF99psb sq6riZTg==; Received: by zero.zsh.org with local id 1t5Ten-000FRg-Uv; Mon, 28 Oct 2024 17:35:57 +0000 Authentication-Results: zsh.org; iprev=pass (mail-lj1-f182.google.com) smtp.remote-ip=209.85.208.182; dkim=pass header.d=gmail.com header.s=20230601 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-lj1-f182.google.com ([209.85.208.182]:56602) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1t5TeC-000Eic-1b; Mon, 28 Oct 2024 17:35:20 +0000 Received: by mail-lj1-f182.google.com with SMTP id 38308e7fff4ca-2fb6110c8faso41638951fa.1 for ; Mon, 28 Oct 2024 10:35:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730136919; x=1730741719; darn=zsh.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=+RP6tbESpZV54fbBylQTxjMbl2p1mW8T0AbyPqd5S4Y=; b=btv5XNTOj24QoEbc9kKCkxlTungCIntKKpxB3l3SjIm2Lq01WME2SgOlKONEDS70w8 X0Diz2jeHYa3pfWVFsP1q0npCZymSTM9oKwgDWgi427TnhpsNEh/9Jn/JvPm/MaHNwu6 jogeVdeL/h0N9RyVOZI1JSKPv6gMoL7iIDIODlAyj9BAPQcRPKIqaBXkYqt+Z8huopAs vUmAu1fjm95WMqIumFPAkf9p6TuEBZcM7TEDdSFqSmPcJzaDvurvNR4Ck/n9bApMChKQ P64IrezQfUjzwxXYZdlKlUm/osHw50iib7W82nsgzTVy35UcMy1/rsI8ByPqJeo1vxCc L7xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730136919; x=1730741719; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+RP6tbESpZV54fbBylQTxjMbl2p1mW8T0AbyPqd5S4Y=; b=ipDnF666wNz7OOvbaEJVbJPfIOnKdtOSqwGV6TeWJcj58YHC06xkqjWkXYcuJtGoE4 evDw0Tcy8ok4nw1Vgdm/pFZMJ4nC/uKTRS6AT2JtmP+i+hw6vH5dgfLtYZM4dk9/aFxU kRuQZ+oOBQ/0M67LdW33GOX7Ley/ZFUnZL/hb+ZgTghhuXHgRYH/ox4m1PEJuhDh4WGd vDHt08h6K4P3bhxgrnMnOCX7ioeLxpopnxDts6rPU8y1MqenARUwG7aCREQHQ+NZtxoG lmZwjhlBnN85fmtI3oman5FZSIVXcXdZvb4xAwSzNU3FbCdyQmU0qCpwzTxnZxduydvB 8Ylg== X-Forwarded-Encrypted: i=1; AJvYcCVOOxuC8dCsQlar+/eXEJKPje/GhNQAgHD/umBsPsqXeDGyBX75uDKh1Mel3LFzVA3AdkVqTHE0d5o=@zsh.org X-Gm-Message-State: AOJu0YzACVRkykebfgoDhx7dt2VOuYbdQ6j1BSz06ohww0xVuVHyh5eb TxjVGGcK5xzMFFb013YY+fn4+8fBiXhrF88slIJ13DQZvOlWqPcQXwIVuRi7mITk9wNy90arpVv l/8I0tHbtRKmhw4WUPDLAc5A+G4M= X-Google-Smtp-Source: AGHT+IFjkG1K2zWuzbLVHY0vX/xNatbYBgScr2D0uuNiOew6xL3fhbG7ekoADW15JwM68cvaGW8NJn5w7ms4S+Sf6Hk= X-Received: by 2002:a05:651c:507:b0:2fc:a347:6d90 with SMTP id 38308e7fff4ca-2fcbdfe2dcbmr33515101fa.27.1730136918905; Mon, 28 Oct 2024 10:35:18 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Roman Perepelitsa Date: Mon, 28 Oct 2024 18:35:05 +0100 Message-ID: Subject: Re: Foreign Commands Not Appearing in 'history' Array When 'sharehistory' Option is Enabled Until a Command is Entered To: Bart Schaefer Cc: Langbart , "zsh-users@zsh.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Seq: 30091 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: On Mon, Oct 28, 2024 at 5:43=E2=80=AFPM Bart Schaefer wrote: > > Short answers: > > On Mon, Oct 28, 2024 at 8:06=E2=80=AFAM Langbart wrote: >> >> >> is it a bug that when the 'sharehistory' option is enabled, commands fro= m other shells ('foreign') aren't included in the 'history' array until the= user enters a command? > > No. I believe the OP is saying that after you execute a command in one terminal and press ENTER in another terminal, within that second terminal all widgets that operate on history, such as history-incremental-search-backward, will see the command, but the `history` array won't contain it. You would need to execute a non-empty command in the second terminal for `history` to get updated. This sounds quite strange and unexpected to me. Is this really intended? Why is an empty command enough to for all history related widgets to pick up commands executed in another terminal, but for `history` to update you need to execute a non-empty command? Roman P.S. I haven't actually tried it but this is my understanding based on what the OP wrote here and on github.