Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Creating a Case statement dynamically
- X-seq: zsh-users 8996
- From: zzapper <david@xxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Creating a Case statement dynamically
- Date: Tue, 28 Jun 2005 18:24:04 +0100
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Sender: news <news@xxxxxxxxxxxxx>
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