Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
pretty easy thing but too hard for me! (random array element)
- X-seq: zsh-users 11692
- From: fREW <frioux@xxxxxxxxx>
- To: "Zsh users list" <zsh-users@xxxxxxxxxx>
- Subject: pretty easy thing but too hard for me! (random array element)
- Date: Wed, 1 Aug 2007 15:23:12 -0600
- Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=l7XuQUUw/UIz9z24SwlySLOl0YMbwUuEVUxAghBTJ7UrLYKxirPOSuXyyXckzMm2OV5X8FTIsOkuApcAhqXpMLXqfuxLwkSWlTSOqcjwcrfmfl58MkiwyGDAPwQVpa22LMLbTOL8s29RFQseKviafOE+/AdAfsZyHAR6ueOalUQ=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=D/Cz/u4LQ6ZFD9u2I283OJt/c35701lUvbq8kM7eFce4D28ko4vnTYUgdBLxd/X3UD9wSExjcUFsp4PUTB8Ikvi5wi8on6dLAKW2UdA7adLx2mNqqCNZgAfA9NUmmt+6KfSNxG4Bi5mSUw9Fbc5qO1mrIy+aInqmT9ioBHCD5oE=
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
Hello zsh amigos!
I want to make a tiny fuction that will
#1 get a list of files
#2 choose a random file
#3 open the random file
I was going to just do something like
arr=( * )
and then
feh $arr[(some random number or something)]
but I don't know how to do the random number part and there may be a
better way anyway. Thoughts? Ideas? Wisdom?
--
-fREW
Q: Why is this email 5 sentences or less?
A: http://five.sentenc.es
Messages sorted by:
Reverse Date,
Date,
Thread,
Author