Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Should (t)path = array-unique-special work this way
- X-seq: zsh-workers 37886
- From: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Should (t)path = array-unique-special work this way
- Date: Fri, 5 Feb 2016 14:45:48 +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=Lgxl59yubNEydejj9b8PbImnoZVLZBh5NrrblB4F3eU=; b=LdqWcbwhhNtqupXiH/VjYuk1tseGYUyfZXe/TxgPzyn/3XXPr7KaGXcmjMGHQ5cFEL nykuWqCtOSN2E3LyTeJU06WMmhU8yPLix94W1Nc6agRf7tmwEUVzbBqmqIoFdXuUxxQg E2X4QRybKsprR0rvsUiQUsGxRWLqWYPb3xlML2WmeXxSn46247e8FQ1ZmNdGtXWH7c+c qpJ76y/FBxAe4VrBDEWQwrWZfUOD3AOSya9Tg1b6wLcphUHlU3u0WE4Vz0K7xv7riAZv PNAfsB+/Tz8eMNGTFll4XbWt3UQKbsf94Sies8E4AEcQ88ApdEAjYSAL4LIwLcUrDx/9 3q8A==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
Hello
typeset -U path
PATH="$PATH:/component/nr1"
path+="/component/nr2"
PATH="/component/nr2:$PATH"
print "${(t)path}"
declare -p path
Outputs:
array-unique-special
typeset -a path
path=( /component/nr2 /usr/local/bin /usr/bin /bin /usr/games
/component/nr1 /component/nr2 )
Tested on zsh-5.0.8 and 5.2
Best regards,
Sebastian Gniazdowski
Messages sorted by:
Reverse Date,
Date,
Thread,
Author