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

Creating a Case statement dynamically



Hi  Z-men


I have script which lists a series of files I might wish to edit

manuals/client-man-admin.tex
manuals/client-man-catalogbasket.tex
manuals/client-man-userguide.tex
quotes/client-admin.tex
quotes/client.tex

I'd like the script to dynamically output a case such


vared -p " Type number to edit or q" -c action
case $action in
 1) gvim manuals/clientman-admin.tex ;;
 2) gvim manuals/clientman-catalogbasket.tex ;;
 etc
 q) exit 0;;
 *) ;; # everything else including return: do nothing
esac

but how to do?

Alternative solutions welcome


-- 
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