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,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 26909 invoked from network); 24 Jan 2023 09:59:50 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 24 Jan 2023 09:59:50 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1674554390; b=jLvn4Wcb4Fqafx27WOsOt6kSpKL6tB+GdaZk/dsMmjztfldORjJUeOAETysXQEd8qVCuVkmn4/ tIl+3o+/H8cwBi9i8iKrdfZpL+jcBMFv1sXgAzCvKVUaicSH+5d64a04OxIBfLifSY/qXX8RDp dlKEVfCgD/mQs2nU0ridiZYj/aXNh0Z8IWiBZEWItTBTBBJeroPJaUN4o9Tlf2+uIQOqmMAcrl 8W2lwh9ksYr+ZOD7GjjZtZ0pOI/f2JuvVQi4sMsitH09bb7HcA4HLmAe7u9hGo6vmfFcuU1GbW gkgfVYaYcwa0ehfQbI9Gb/kfcMKfI/h6c8ROyE9IddDBBg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-lf1-f44.google.com) smtp.remote-ip=209.85.167.44; 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=1674554390; bh=WhRSkLQau2AdWL+N8ydkKoaqGc+uTyV8jlDUO20Ucns=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=qiTtEBb00JPsO/A/C9gdyekD5uvIEg3jMVPlwrKnin18IxvqxuK0/UB3gS8ZOplcbsUtj/47nt VmeMpQL3c5XtGRkxiRroyH2ztGD0C4yl+W52fOoo13OBJDyID85BYg5wdyuwkata0WPujR9Xe8 /lsgQ9yvIUpqoHf2b4Bjhf1yc121076gZDmWyfRDn6s8YjlbFXZN/7Swt+u/rSuFXQY+tr4sEk LgdqV/TUcFROvq1Np600H7GOu9ZoRRBfL94MCOtYIeAop0cx9ksBpg6qYxQPqzOgo5F7dhMZ3S 8kCAUGju8ZN0qQlDBjtuZRgi3LV9Z9MI/gTUN1BHAnjPkw==; 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:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=lyn9RXmR0AMsZUYfTYfVASuerRzwxR+0hJrlJHHZKqM=; b=iqc8v4s0PmNPQ+E6zM2IerKbxl A7frMqKMopRv+0nd1XbhwAjeN+ijBBWzLp2vMWl40zC9R4aVc1Tip9ZfH6lwogOlvXLEyt4Ipws22 Hvo3q0Q2idGbYWD+zmDyfFzIfXlL6Ib0ztgsCAcCYNRclxy+uYMtnFMYJAT3PRFuTEGySi2OtMM3t wGTguePtGBrsZB199S9uPb2Duq7/yd4ZApsUI1ku0e9/u48ORY9tE3T5/P5ocBD0/0sewuYi39DYz ELz+m/RluVRrEM9JWCeisfnMggF4ZR0df4ZbpuhRo7bzK5K1QF/H3BuItsQM47IMACYQVOVXuq1kh 4ZMtyYIg==; Received: by zero.zsh.org with local id 1pKG5m-0000OJ-5m; Tue, 24 Jan 2023 09:59:50 +0000 Authentication-Results: zsh.org; iprev=pass (mail-lf1-f44.google.com) smtp.remote-ip=209.85.167.44; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-lf1-f44.google.com ([209.85.167.44]:34758) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1pKG2l-000PaX-N9; Tue, 24 Jan 2023 09:56:44 +0000 Received: by mail-lf1-f44.google.com with SMTP id cf42so22564773lfb.1 for ; Tue, 24 Jan 2023 01:56:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=lyn9RXmR0AMsZUYfTYfVASuerRzwxR+0hJrlJHHZKqM=; b=QRNmYFhGlvaRZQR7sUOjrerjrw3NeeEntmUsFbH8CkB2o4a5RmETkyuPBbCR8jbnBq dUa20i3sJ95eI0Gd0RsuFltQ7wSSrmr24tgB6Ol1PaVmSYH7zWBeCulfQzaCvnpWLqC9 OsuvQx74puJm1JaXyhWvlykj+TRoQtXg8JeYvMAK8FaftloTDzYZvUrGIKqZ6JwbtG92 +7JQ0VYx3czqSfs18Z6w0gbVRfDkelu1usthIDZIcthmmgyE7ehUgFm7g9SYJCCqBeX0 SdkLDK4Xhl5mldf1idR7Kjz7Sq50U7TJbkpd+pAzJJ9IYkFLNCMyBJBbcmEGng7/waiR aAAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=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=lyn9RXmR0AMsZUYfTYfVASuerRzwxR+0hJrlJHHZKqM=; b=UhGVUZgiSicy4C76ChdMTtIdrA1040H9HDwmfuxT+VCrWkI/f9TT8XSVxoLbSFSRWd eO7wNcfXLfSOqZI7NnJdXW9NnXFkrZ3tqro5loFT6YnCfgs4xNf7P6lkHHoN1K4ySo7z Vz+cxqPCf2WNlfDCtOiglmGFlyBNZLXgj78QEG3getaId6SPPRsnJhfn3yIDTSI2j5KZ onj1s8dH/F1YNhaCA2e9RnH+J0djFPt2uIEd7lE5/SNgiWU6P1z2DVWnj7vUiQqXg9ck oV2kT5nxe5RzMrEVr/aALAWSizhxTpHaR6N4Yk2NWpQSKpJgOiO1HowVVNNDLYgvzYrt p21Q== X-Gm-Message-State: AFqh2koN94Tfb5VM3P7QQGXDAmAPb1VALo2oV6mD55C/paayJF9C6iS0 zTc+PGCKr5n8DEftfZ0eP8EJB/zfnhYoihbldgc= X-Google-Smtp-Source: AMrXdXszs6WxSXC6C+8C1jtLltCbDPXi6lYbJfjimoyKJBsg3MDCxyXxIJbjg8fDmVlnXqc5kmAOpu1GA32IN/xhcVY= X-Received: by 2002:a19:385d:0:b0:4b1:7729:3920 with SMTP id d29-20020a19385d000000b004b177293920mr1351816lfj.681.1674554202836; Tue, 24 Jan 2023 01:56:42 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Roman Perepelitsa Date: Tue, 24 Jan 2023 10:56:30 +0100 Message-ID: Subject: Re: A way to untie -T vars? To: Bart Schaefer Cc: Pier Paolo Grassi , Zsh Users Content-Type: text/plain; charset="UTF-8" X-Seq: 28761 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 Tue, Jan 24, 2023 at 6:45 AM Bart Schaefer wrote: > > I've reached the conclusion that "local" makes no difference here. I actually knew that! There is no way to remove a parameter from a scope. Once a name is added to a scope, it stays there forever (until the whole scope dies) and a lookup for the name will always stop on this scope. > Attached this time because I'm sure gmail would maim it. This has > been tested with convoluted cases, but not with simple ones, so it may > still need refinement. LGTM. I'm a bit paranoid about matching words such as "tied" without anchors. If in the future we get type keywords that have these as substrings ("guarantied"), this code will break. The fact that this function has to fork diminishes its applicability greatly. Up until this thread I thought that `bindkey` was the only builtin that printed information that is otherwise unobtainable: retrieving bindings requires forking or file I/O. Now `typeset +m` can be added to the list: retrieving the type of a parameter also requires forking or file I/O. Roman.