From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26867 invoked by alias); 15 Feb 2016 07:55:54 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 21290 Received: (qmail 24008 invoked from network); 15 Feb 2016 07:55:52 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=hnBXK7itpmTMN9InM0SmK7IAAFjE9/BBY4jx95Ptqfo=; b=C5U4jwRiJwY3IcvnW/61YWlpWeUyklqcc1d9XL8Lr/3HEevdedDosFvaNNE/CCUU9L ro3Z6uUfnOBh05Fl8/S7Z20s8IM+ILCMMUepALCh+i9Gr4ArVRP/p3UBSyeamuQ62oiK 5OlWcXAvo0eiya2csYxdwjoIRM54yF+tiTWXlxOZdQ5zKJHFalLpKkq3nsGk7slBagLy MThXMNJtnArXUvLmcaX/u5Z8/emtuuhVNKHQC9qvQJ6tGKaSz+r4vM/iuExIHC/RujhV xL9s+If7jK9FzZI4ZeEmPQN0Lf6dB2zPwIQ7pvpf3IQ+AINnujuHPC5/XdrzAoEzBC97 UioA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to :content-type; bh=hnBXK7itpmTMN9InM0SmK7IAAFjE9/BBY4jx95Ptqfo=; b=C4/Ws3sFwTcf84Nu6ACgGqfOxp0OqaKHmIO9CEya7rbu/PCNqK4aOvPUp9IDzeFWU4 B6TRPnfBV5VW0QxSztuP/wegqBe0rcMtNO2BDydQm3CzgCa0WIB4rcfb2HTkTeTgPlHT TohJ8FdRyxSkJQVCiIaikdlxxcdsz7Bi5eqpzVYNIf8X+ypZVQ9e8ar9oeFiV0SbVYdU 9abRy46kq+aW4l1CsMozVzE++YQHMQYzQPr8epIZ03Zm+nEBuOWf7ngcJ87pAZnMPMLY fMRB952o96Mx1i6XYlCMqdllqM0Z8nbsKJM/m3pAXeiVp7AxmSIzgy/69xSXatqhWRrk BIOQ== X-Gm-Message-State: AG10YOTpmc4toCWoG+PgZU8uM+0dPKAwB+gnd6EfQIAUFWV1PH9V3OwnoObLQ98D3bGbhl7tNuPzl2Wt3nmt9g== X-Received: by 10.25.156.196 with SMTP id f187mr6189484lfe.150.1455522949941; Sun, 14 Feb 2016 23:55:49 -0800 (PST) MIME-Version: 1.0 From: Sebastian Gniazdowski Date: Mon, 15 Feb 2016 08:55:30 +0100 Message-ID: Subject: Truncate $functions To: Zsh Users Content-Type: text/plain; charset=UTF-8 Hello, tried functions=( a b ), set -A functions ( a b ), unset functions but all don't truncate functions. Test on IRC bot: >> myf() { echo "test"; }; echo $parameters[functions]; unset functions; functions=( a b c d ); echo $parameters[functions]; echo ${#functions} association-hide-hideval-special association-hide-hideval-special 3 Maybe there is a way to do this? I would want to reload all functions, first serializing them, with say declare -f. Unsetting function entries one by one with "unset 'functions[entry]'" isn't fully foolproof because functions named e.g. opp+a[ cannot be unset this way. Maybe there is a way to stop unset[$i] with i='opp+a[ ' from stopping script? I would then fallback to define the function as empty. Best regards, Sebastian Gniazdowski