]> git.bundesbrandschatzamt.de Git - emacsconfig.git/commitdiff
snippets/cfengine3-mode: adding filelink and filesetvalquoted.
authorAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Mon, 19 Jan 2015 13:29:47 +0000 (14:29 +0100)
committerAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Mon, 19 Jan 2015 13:29:47 +0000 (14:29 +0100)
Signed-off-by: Andreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
snippets/cfengine3-mode/filelink [new file with mode: 0644]
snippets/cfengine3-mode/filesetvalquoted [new file with mode: 0644]

diff --git a/snippets/cfengine3-mode/filelink b/snippets/cfengine3-mode/filelink
new file mode 100644 (file)
index 0000000..36a9fb9
--- /dev/null
@@ -0,0 +1,9 @@
+# -*- mode: snippet -*-
+# name: filelink
+# key: fileln
+# --
+"${1:file}"
+handle => "${1:$(concat (replace-regexp-in-string "^bundle_agent_" "" (replace-regexp-in-string "[ /.-]" "_" (which-function))) "_link" (replace-regexp-in-string "[ /.-]" "_" (yas-text)))}",
+comment => "ln -s $1",
+move_obstructions => "${5:$$(yas-choose-value '("true" "false"))}",
+link_from => ln_s( "$6" );
diff --git a/snippets/cfengine3-mode/filesetvalquoted b/snippets/cfengine3-mode/filesetvalquoted
new file mode 100644 (file)
index 0000000..9f4537c
--- /dev/null
@@ -0,0 +1,10 @@
+# -*- mode: snippet -*-
+# name: filesetvalquoted
+# key: filesetvalquoted
+# --
+"${1:file}"
+handle => "${1:$(concat (replace-regexp-in-string "^bundle_agent_" "" (replace-regexp-in-string "[ /.-]" "_" (which-function))) "_edit" (replace-regexp-in-string "[ /.-]" "_" (yas-text)))}",
+comment => "configure $1",
+perms => mog("${2:600}","${3:root}","${4:root}"),
+create => "${5:$$(yas-choose-value '("true" "false"))}",
+edit_line => set_quoted_values( "\$(this.bundle).$6" );