Skip to content

Commit ffa056e

Browse files
Mostafa Kamal0devcoCEO
Mostafa Kamal
andcommitted
linux
Co-Authored-By: 0dev CEO <0devcoceo@users.noreply.github.com>
1 parent 42a5939 commit ffa056e

File tree

2 files changed

+108
-0
lines changed

2 files changed

+108
-0
lines changed

snippets/bash.cson

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,26 @@
55
'body': """
66
# This is bash comment
77
"""
8+
's-bash -> bash':
9+
'prefix': 's-bash',
10+
'body': """
11+
#!/usr/bin/env bash
12+
"""
13+
's-echo -> bash':
14+
'prefix': 's-echo',
15+
'body': """
16+
echo $1
17+
"""
18+
's-printf -> bash':
19+
'prefix': 's-printf',
20+
'body': """
21+
printf $1
22+
"""
23+
's-read -> bash':
24+
'prefix': 's-read',
25+
'body': """
26+
read -p "your Q?"qs
27+
"""
828
'var set -> bash':
929
'prefix': 's-var',
1030
'body': """
@@ -193,3 +213,69 @@
193213
'body': """
194214
|| $1
195215
"""
216+
'not -> bash':
217+
'prefix': 's-not',
218+
'body': """
219+
! $1
220+
"""
221+
'continue -> bash':
222+
'prefix': 's-continue',
223+
'body': """
224+
continue
225+
"""
226+
'break -> bash':
227+
'prefix': 's-break',
228+
'body': """
229+
break
230+
"""
231+
232+
'function -> bash':
233+
'prefix': 's-function',
234+
'body': """
235+
user() {
236+
#code
237+
}
238+
"""
239+
240+
'sleep -> bash':
241+
'prefix': 's-sleep',
242+
'body': """
243+
sleep $1
244+
"""
245+
246+
'-e exist file -> bash file':
247+
'prefix': 'sf-e',
248+
'body': """
249+
-e $1
250+
"""
251+
'-d exist directory -> bash file':
252+
'prefix': 'sf-d',
253+
'body': """
254+
-d $1
255+
"""
256+
'-f exist file & regular -> bash file':
257+
'prefix': 'sf-f',
258+
'body': """
259+
-f $1
260+
"""
261+
'-r read -> bash file':
262+
'prefix': 'sf-r',
263+
'body': """
264+
-r $1
265+
"""
266+
'-w write -> bash file':
267+
'prefix': 'sf-w',
268+
'body': """
269+
-w $1
270+
"""
271+
'-x execute -> bash file':
272+
'prefix': 'sf-x',
273+
'body': """
274+
-x $1
275+
"""
276+
277+
'export -> bash':
278+
'prefix': 's-export',
279+
'body': """
280+
export PATH=file$1:$PATH
281+
"""

snippets/linux.cson

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
'.source.shell':
2+
3+
'apt-get install -> linux':
4+
'prefix': 'apt-install',
5+
'body': """
6+
sudo apt-get install name$1
7+
"""
8+
'apt-get update -> linux':
9+
'prefix': 'apt-update',
10+
'body': """
11+
sudo apt-get update
12+
"""
13+
'apt-get remove -> linux':
14+
'prefix': 'apt-remove',
15+
'body': """
16+
sudo apt-get remove name$1
17+
"""
18+
'apt-get autoremove -> linux':
19+
'prefix': 'apt-remove',
20+
'body': """
21+
sudo apt-get autoremove name$1
22+
"""

0 commit comments

Comments
 (0)