Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Prepend to array
- X-seq: zsh-users 27746
- From: Perry Smith <pedz@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Prepend to array
- Date: Mon, 9 May 2022 15:30:30 -0500
- Arc-authentication-results: i=1;	rspamd-554c8f6c56-fjbfk;	auth=pass smtp.auth=a2hosting smtp.mailfrom=pedz@xxxxxxxxxxxxxxxx
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net;	s=arc-2022; t=1652128232;	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:	 to:to:cc:mime-version:mime-version:content-type:content-type:	 dkim-signature; bh=ZqNHStyw2YfWPXl5n8Hnd3fmDllyHxx7B7Zu6/Amk/w=;	b=hKtVI2k7Df4p7FPK+4A7oSZVv1tRzN5k7Umr63kDF6F0x0S4FASIJOa8U2ckM6mWecvGS+	yCe3j6URCOIzQaeAUg1oR4p02va2L32kMAjqiUe0f+h3Vd8X6eZ0q9nF3Qiapk5eQlYggZ	yuOods3dm5P15cremWSciqlTrmDeJlRiFyRWEvRDk//f7gaBUzP3E4LRLSlCxEEDOzTZAV	3ZO9jGrEOpXY9eckuzAhU6aTpv13+WqfGTAttg+P1oeIsm/dkOSGTePTYVqlH0vX9gjM4z	mNTK0V1uf92cnij7FpLeBCswRSUWc35onqh/f7ST/UI+yP0kPRboLTgff0qN7g==
- Arc-seal: i=1; s=arc-2022; d=mailchannels.net; t=1652128232; a=rsa-sha256;	cv=none;	b=aUSHcP/9aBPkM52zBFHumvtx1vnrxq8iTF5EA2t3H1HmHqiz2NMhqq5eehZ9zCj11DyaI4	orWt4m2sEfardgLTfWpolFRJ5XDBcQOUEYWMHwG+IN2tyfNI2OvNwJREfIjk1ja/b4WdGl	eUfNzkATLDXi++6oiVVS4t0vjokE5Cid5dTnzmUIOSikd1V4syPYZc6myWwMP+hqSYZAi1	YicGMHmzLWjHXK/enI7MR55DZtX4oYTqtp2ovW+4FOH0yuEwuxHxFRmc6NP484iCvdop6T	9fUoWrm/H4HOCU5R1GX5zepzHZSnUxJ3lG2n6Jw2kidtbOubdW279aQypRDZyw==
- Archived-at: <https://zsh.org/users/27746>
- List-id: <zsh-users.zsh.org>
I have no idea where I came up with this but reading the internet and the documentation leads me to think that this isn’t really supported.
> # Add in my own functions
> fpath[1,0]=$ZDOTDIR/functions
It does exactly what I want: it prepends $ZDOTDIR/functions to the front of the fpath array.  I can’t even find an example where the 2nd index is less than the first index.
So, I thought I would ask:
1) Is the above syntax supported or does it just happen to work currently?
2) What is the prescribed method of prepending to an array: e.g.
Before
fpath=( /a/b /c/d )
After
fpath=( /x/y /a/b /c/d )
Thank you for your time,
Perry
Attachment:
signature.asc
Description: Message signed with OpenPGP
Messages sorted by:
Reverse Date,
Date,
Thread,
Author