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

Re: Creating a Case statement dynamically



On Tue, 28 Jun 2005 15:50:54 -0700,  wrote:

>2005/6/28, Nikolai Weibull <mailing-lists.zsh-users@xxxxxxxxxxxxxxxxxxxxxx>:
>> zzapper wrote:
>> 
>> > I have script which lists a series of files I might wish to edit
>> >
>> > I'd like the script to dynamically output a case
>> 
>> Use an array/list and select the nth element from it,
>>         nikolai
>> 
>
>I suggest the "select" loop.  For example:
>
>select f in **/*.tex; do
>  if [[ "$REPLY" = q ]]; then
>    break
>  elif [[ -n "$f" ]]; then
>    gvim $f
>  fi
>done
>
>Note that this block will loop until you exit with ^C or q.
thx just what I was looking for!

-- 
zzapper
vim -c ":%s%s*%Cyrnfr)fcbafbe[Oenz(Zbbyranne%|:%s)[[()])-)Ig|norm Vg?"
http://www.rayninfo.co.uk/tips/ vim, zsh & success tips



Messages sorted by: Reverse Date, Date, Thread, Author