[Geany] Snippets for Shell scripting
Dominic Hopf
dmaphy at xxxxx
Sat Jul 31 20:41:34 UTC 2010
Hey guys,
I just found myself writing a bit more shell script code and thus wrote
some quick snippets into my snippets.conf for making this easier and
faster.
The case..esac construct actually is a bit quirky and I wanted to spare
the efforts of writing this to anyone who may has to work a lot with
Shell scripting...
So, anyone who's interested can copy this into his or her snippets.conf:
[Sh]
if=if [ %cursor% ]; then\n\t%cursor%\nfi
for=for i in `%cursor%`;\ndo\n\t%cursor%\ndone
else=else\n\t%cursor%
case=case %cursor% in \n\t%cursor%)\n\t\t%cursor%\n\t\t;;\n\t%cursor%)\n
\t\t%cursor%\n\t\t;;\n\t*)\n\t\t%cursor%\n\t\t;;\nesac\n%cursor%
(Note the case construct is one line, actually.)
Regards,
Dominic
--
Dominic Hopf <dmaphy at googlemail.com>
http://dominichopf.de/
Key Fingerprint:
A7DF C4FC 07AE 4DDC 5CA0 BD93 AAB0 6019 CA7D 868D
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.geany.org/pipermail/users/attachments/20100731/2758ebbe/attachment.pgp>
More information about the Users
mailing list