Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
snippets:shell:start [2011/06/13 17:18] – created enricosnippets:shell:start [2015/11/29 14:15] (current) – Fixed spelling/syntax error devyncjohnson
Line 1: Line 1:
-====== Collection of Snippets for Shellscript ======+====== Collection of Snippets for Shell-Scripts ======
  
 Just copy the the [Sh] section from the code below into your snippets file, e.g. in //~/.config/geany/snippets.conf//. Just copy the the [Sh] section from the code below into your snippets file, e.g. in //~/.config/geany/snippets.conf//.
  
-<code>+<code properties>
 [Sh] [Sh]
 if=if [ %cursor% ]; then\n\t%cursor%\nfi if=if [ %cursor% ]; then\n\t%cursor%\nfi
Line 10: Line 10:
 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% 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%
 </code> </code>
 +
 +====== Alternative (Enhanced) ======
 +
 +<code properties>[Sh]
 +head=#!/bin/sh\n# -*- coding: utf-8 -*-\n# vim:fileencoding=utf-8\n# Created by {developer}\n# <{mail}>\n# DESCRIPTION\n# Version {date}
 +hashpling=#!/bin/sh\n
 +bashhashpling=#!/bin/bash\n
 +cshhashpling=#!/bin/csh\n
 +envhashpling=#!/usr/bin/env INTERPRETER\n
 +utf8=# -*- coding: utf-8 -*-\n# vim:fileencoding=utf-8\n
 +bash=#!/bin/bash
 +rmdir=rm -vrd --one-file-system /PATH/*
 +softlink=ln -vs -t /DESTINATION/PATH /LINK/FILE</code>
  
 {{tag>snippet shell}} {{tag>snippet shell}}
Print/export