1+ {
2+ "Create Custom Command" : {
3+ "prefix" : " def" ,
4+ "body" : [
5+ " # Documentation for ${1:Custom_Command_Name}" ,
6+ " def ${1:Custom_Command_Name} [] {" ,
7+ " \t # Write some code here" ,
8+ " \t ${2}" ,
9+ " }"
10+ ],
11+ "description" : " Example: Write a custom command"
12+ },
13+ "Custom Command With Parameter" : {
14+ "prefix" : " defp" ,
15+ "body" : [
16+ " # Documentation for ${1:Custom_Command_Name}" ,
17+ " # Written on ${CURRENT_YEAR}-${CURRENT_MONTH}-${CURRENT_DATE} ${CURRENT_HOUR}:${CURRENT_MINUTE}:${CURRENT_SECOND}" ,
18+ " def ${1:Custom_Command_Name} [" ,
19+ " \t ${2:Param_Name} # Docs for ${2:Param_Name}" ,
20+ " \t ] {" ,
21+ " \t # Test the parameter" ,
22+ " \t echo \\ $${2:Param_Name}" ,
23+ " \t ${3}" ,
24+ " }"
25+ ],
26+ "description" : " Example: Write a custom command with a parameter"
27+ },
28+ "Custom Command With Switch" : {
29+ "prefix" : " defs" ,
30+ "body" : [
31+ " # Documentation for ${1:Custom_Command_Name}" ,
32+ " # Written on ${CURRENT_YEAR}-${CURRENT_MONTH}-${CURRENT_DATE} ${CURRENT_HOUR}:${CURRENT_MINUTE}:${CURRENT_SECOND}" ,
33+ " def ${1:Custom_Command_Name} [" ,
34+ " \t --${2:Long_Switch}(-${3:Short_Switch}) # Docs for ${2:Long_Switch}" ,
35+ " \t ] {" ,
36+ " \t\t let is_${2:Long_Switch} = $(= \\ $${2:Long_Switch} | empty?)\n " ,
37+ " \t\t if \\ $is_${2:Long_Switch} {" ,
38+ " \t\t\t echo \\ $true" ,
39+ " \t\t } {" ,
40+ " \t\t\t echo \\ $false" ,
41+ " \t\t }\n " ,
42+ " \t # Write some code here" ,
43+ " \t ${4}" ,
44+ " }"
45+ ],
46+ "description" : " Example: Write a custom command with a switch"
47+ },
48+ "Create an Alias" : {
49+ "prefix" : " alias" ,
50+ "body" : [
51+ " # Documentation for ${1:Alias_Name}" ,
52+ " aliase ${1:Alias_Name} = ${2}"
53+ ],
54+ "description" : " Create an alias"
55+ }
56+ }
0 commit comments