# 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
#
# 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}"),
# 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}" );
# 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" );
# 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}" );
# 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}" );
# 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}" );
# 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}";
# 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}");
# 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;