Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Truncate $functions
- X-seq: zsh-users 21290
- From: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: Truncate $functions
- Date: Mon, 15 Feb 2016 08:55:30 +0100
- 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==
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author