]> git.bundesbrandschatzamt.de Git - emacsconfig.git/commitdiff
snippets/cfengine3-mode/*: include filename by default.
authorAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Sun, 23 Nov 2014 18:37:36 +0000 (19:37 +0100)
committerAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Sun, 23 Nov 2014 18:37:36 +0000 (19:37 +0100)
Signed-off-by: Andreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
snippets/cfengine3-mode/customlibservice
snippets/cfengine3-mode/fileappend
snippets/cfengine3-mode/filecplocal
snippets/cfengine3-mode/fileexpand
snippets/cfengine3-mode/filequad
snippets/cfengine3-mode/filesetval
snippets/cfengine3-mode/filesetvalini
snippets/cfengine3-mode/filetemplate
snippets/cfengine3-mode/mkdir
snippets/cfengine3-mode/usebund

index c1290faed46308993e9ba11cd66c763f8d68d365..82e1ff989e1fdc2640fe7bd3602c7418a6285979 100644 (file)
@@ -2,7 +2,7 @@
 # name: custserv
 # key: custserv
 # --
-#=head2 bundle agent customlib_${1:`(car (last (split-string (file-name-sans-extension (buffer-file-name)) "/" t)))`}
+#=head2 bundle agent customlib_${1:`(concat (replace-regexp-in-string "[ /.-]" "_" ( file-name-nondirectory (file-name-sans-extension (buffer-file-name)))) "_")`}
 #
 # $0
 #
index 4fbd1d0bf37ff88e9d5bd9f0d6d53181d7bbebf4..d2243c086623857f07e027d8fd48168652abbe0c 100644 (file)
@@ -2,7 +2,7 @@
 # name: fileappend
 # key: fileappend
 # --
-"${1:file}"
+"$1"
 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("${3:644}","${4:root}","${5:root}"),
index 49345bbc5b5c3d068eccca0206ed386298a80135..6811f70b5f4689b8f2cb680dc54f488e954f559a 100644 (file)
@@ -3,7 +3,7 @@
 # key: filecplocal
 # --
 "${1:file}"
-handle => "create_$2",
+handle => "${1:$(concat (replace-regexp-in-string "^bundle_agent_" "" (replace-regexp-in-string "[ /.-]" "_" (which-function))) "_create" (replace-regexp-in-string "[ /.-]" "_" (yas-text)))}",
 comment => "copy $1",
 perms => mog("${3:644}","${4:root}","${5:root}"),
 copy_from => local_dcp("$(this.promise_dirname)/templates/${6}" );
index 3c9e812e839f945fe0301cec9c0267197fc7e7fe..844a0fd222f4808632ac194313f2346c5915a35a 100644 (file)
@@ -3,9 +3,9 @@
 # key: fileexpand
 # --
 "${1:file}"
-handle => "edit_$2",
+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("${3:644}","${4:root}","${5:root}"),
-create => "${6:$$(yas-choose-value '("true" "false"))}",
+perms => mog("${2:644}","${3:root}","${4:root}"),
+create => "${5:$$(yas-choose-value '("true" "false"))}",
 edit_defaults => empty,
-edit_line => expand_variables( "\$(this.promise_dirname)/templates/${7}" );
+edit_line => expand_variables( "\$(this.promise_dirname)/templates/$6" );
index def27971551d469bcc167bcf94867cc9c8fe013b..6ea07138c8892138deb971559d2f03b438b0e0fd 100644 (file)
@@ -3,8 +3,8 @@
 # key: filequad
 # --
 "${1:file}"
-handle => "create_$2",
+handle => "${1:$(concat (replace-regexp-in-string "^bundle_agent_" "" (replace-regexp-in-string "[ /.-]" "_" (which-function))) "_create" (replace-regexp-in-string "[ /.-]" "_" (yas-text)))}",
 comment => "copy $1",
-perms => mog("${3:644}","${4:root}","${5:root}"),
-create => "${6:$$(yas-choose-value '("true" "false"))}",
-copy_from => quad_remote_copy("$(this.promise_dirname)/templates/${7}","\${shared_global_environment.mps1}", "\${shared_global_environment.mps2}", "\${shared_global_environment.mps3}", "\${shared_global_environment.mps4}" );
+perms => mog("${2:644}","${3:root}","${4:root}"),
+create => "${5:$$(yas-choose-value '("true" "false"))}",
+copy_from => quad_remote_copy("$(this.promise_dirname)/templates/${6}","\${shared_global_environment.mps1}", "\${shared_global_environment.mps2}", "\${shared_global_environment.mps3}", "\${shared_global_environment.mps4}" );
index 5587828f75bf409fcbf5bdc3b9b0d54ed89eebf4..184f740621e7661e7758d97da1426b766a192e51 100644 (file)
@@ -3,8 +3,8 @@
 # key: filesetval
 # --
 "${1:file}"
-handle => "edit_$2",
+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("${3:600}","${4:root}","${5:root}"),
-create => "${6:$$(yas-choose-value '("true" "false"))}",
-edit_line => set_variable_values( "\$(this.bundle).${7}" );
+perms => mog("${2:600}","${3:root}","${4:root}"),
+create => "${5:$$(yas-choose-value '("true" "false"))}",
+edit_line => set_variable_values( "\$(this.bundle).${6}" );
index 8bd6ad69c7baaa36164c3ede60b5a97ff722768a..69563dda0bcaf08c177744b76c36acbf44ef8deb 100644 (file)
@@ -3,8 +3,8 @@
 # key: filesetvalini
 # --
 "${1:file}"
-handle => "edit_$2",
+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("${3:600}","${4:root}","${5:root}"),
-create => "${6:$$(yas-choose-value '("true" "false"))}",
-edit_line => set_variable_values_ini( "\$(this.bundle).${7}", "${8:section}" );
+perms => mog("${2:600}","${3:root}","${4:root}"),
+create => "${5:$$(yas-choose-value '("true" "false"))}",
+edit_line => set_variable_values_ini( "\$(this.bundle).${6}", "${7:section}" );
index 2068bc470fcbaeae5a9e1a24939b92b4658e2e18..34224a40bab70f688c0b0853fae2bc153700cfba 100644 (file)
@@ -3,8 +3,8 @@
 # key: filetemplate
 # --
 "${1:file}"
-handle => "edit_$2",
+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("${3:440}","${4:root}","${5:root}"),
-create => "${6:$$(yas-choose-value '("true" "false"))}",
-edit_template => "\$(this.promise_dirname)/templates/${7}";
+perms => mog("${2:440}","${3:root}","${4:root}"),
+create => "${5:$$(yas-choose-value '("true" "false"))}",
+edit_template => "\$(this.promise_dirname)/templates/${6}";
index 90923049fcf3c61267440f8303ff1d552bf6664d..30674775dbcd22db297f9ad6254e623c9e3e3f5f 100644 (file)
@@ -3,7 +3,7 @@
 # key: mkdir
 # --
 "${1:file}/."
-handle    => "\$(this.bundle)_$2",
-comment   => "$3",
-create    => "${4:$$(yas-choose-value '("true" "false"))}",
-perms     => mog("${5:700}","${6:root}","${7:root}");
+handle => "${1:$(concat (replace-regexp-in-string "^bundle_agent_" "" (replace-regexp-in-string "[ /.-]" "_" (which-function))) "_mkdir" (replace-regexp-in-string "[ /.-]" "_" (yas-text)))}",
+comment   => "mkdir $1",
+create    => "${3:$$(yas-choose-value '("true" "false"))}",
+perms     => mog("${4:700}","${5:root}","${6:root}");
index 326c44aed5df90dd9a8bd2e79c031930c2e9db0f..e0e4dc38354f6e78be2d0b644e9eaa2bef2f988b 100644 (file)
@@ -2,4 +2,4 @@
 # name: usebund
 # key: usebund
 # --
-"customlib_`(car (last (split-string (file-name-sans-extension (buffer-file-name)) "/" t)))`_$2" usebundle => customlib_`(car (last (split-string (file-name-sans-extension (buffer-file-name)) "/" t)))`_$2;
+"customlib_`(replace-regexp-in-string "[ /.-]" "_" ( file-name-nondirectory (file-name-sans-extension (buffer-file-name))))`_$1" usebundle => customlib_`(replace-regexp-in-string "[ /.-]" "_" ( file-name-nondirectory (file-name-sans-extension (buffer-file-name))))`_$1;