Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

pretty easy thing but too hard for me! (random array element)



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