Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 07f7ab7

Browse files
Mostafa Kamal0devcoCEO
Mostafa Kamal
andcommitted
bash
Co-Authored-By: 0dev CEO <0devcoceo@users.noreply.github.com>
1 parent bb246f5 commit 07f7ab7

File tree

6 files changed

+265
-2
lines changed

6 files changed

+265
-2
lines changed

‎.npmignore‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.DS_Store
2+
npm-debug.log
3+
node_modules

‎LICENSE.md‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Copyright (c) 2015 Vuong Phan
2+
3+
Permission is hereby granted, free of charge, to any person obtaining
4+
a copy of this software and associated documentation files (the
5+
"Software"), to deal in the Software without restriction, including
6+
without limitation the rights to use, copy, modify, merge, publish,
7+
distribute, sublicense, and/or sell copies of the Software, and to
8+
permit persons to whom the Software is furnished to do so, subject to
9+
the following conditions:
10+
11+
The above copyright notice and this permission notice shall be
12+
included in all copies or substantial portions of the Software.
13+
14+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

‎README.md‎

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,33 @@
1-
# atom-bash
2-
bash snippets
1+
# ⚛️ Atom Bash
2+
3+
<p align="center" ><img src="https://user-images.githubusercontent.com/17185462/43356534-0acdf760-9294-11e8-9227-17c3c5a4fcb5.jpg"></p>
4+
5+
6+
7+
Install:
8+
```ssh
9+
apm install atom-bash
10+
```
11+
12+
Mian Features:
13+
14+
- Snippet Bash
15+
16+
17+
Version:
18+
19+
- bash 1.0.0
20+
21+
22+
## Snippet list
23+
|Snippet short| Description|
24+
|----|-----------|
25+
| s- | bash all |
26+
| sc- | comparision(-eq,-ne...) |
27+
28+
29+
---
30+
> [@code4mk](https://twitter.com/code4mk)
31+
32+
33+
<a href="https://twitter.com/0devco"><p align="center" ><img src="https://raw.githubusercontent.com/0devco/docs/master/.devco-images/logo-transparent.png"></p></a>

‎package.json‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"name": "atom-bash",
3+
"version": "0.0.0",
4+
"description": "bash snippets >> Snippet >> atom-bash by @code4mk & 0devco",
5+
"keywords": [
6+
"bash",
7+
"snippet",
8+
"code4mk",
9+
"0devco"
10+
],
11+
"repository": {
12+
"type": "git",
13+
"url": "https://github.com/code4mk/atom-bash"
14+
},
15+
"license": "MIT",
16+
"engines": {
17+
"atom": ">=1.0.0 <2.0.0"
18+
},
19+
"dependencies": {}
20+
}

‎settings/demo.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0devco

‎snippets/bash.cson‎

Lines changed: 188 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,188 @@
1+
'.source.shell':
2+
3+
'comment -> bash':
4+
'prefix': 's-comment',
5+
'body': """
6+
# This is bash comment
7+
"""
8+
'var set -> bash':
9+
'prefix': 's-var',
10+
'body': """
11+
var_name=1ドル
12+
"""
13+
'var local set -> bash':
14+
'prefix': 's-varlocal',
15+
'body': """
16+
local var_name=1ドル
17+
"""
18+
'var global set -> bash':
19+
'prefix': 's-varglobal',
20+
'body': """
21+
export var_name=1ドル
22+
"""
23+
'var get -> bash':
24+
'prefix': 's-varget',
25+
'body': """
26+
$var_name
27+
"""
28+
'var delete -> bash':
29+
'prefix': 's-vardelete',
30+
'body': """
31+
del var_name
32+
"""
33+
34+
'arithmatic -> bash':
35+
'prefix': 's-math',
36+
'body': """
37+
$(( 1ドル ))
38+
"""
39+
40+
'array set -> bash':
41+
'prefix': 's-arrayset',
42+
'body': """
43+
array_list=(a1 a2)
44+
"""
45+
46+
'array get -> bash':
47+
'prefix': 's-arrayget',
48+
'body': """
49+
${array_list[1ドル]}
50+
"""
51+
'array slice -> bash':
52+
'prefix': 's-arrayslice',
53+
'body': """
54+
${array_list[1ドル]:0:3}
55+
"""
56+
'array delete -> bash':
57+
'prefix': 's-arraydelete',
58+
'body': """
59+
unset array_list[1ドル]
60+
"""
61+
62+
'condition part [] -> bash':
63+
'prefix': 's-condition-part',
64+
'body': """
65+
[ 1ドル ]
66+
"""
67+
'equal -> bash':
68+
'prefix': 'sc-eq',
69+
'body': """
70+
-eq 1ドル
71+
"""
72+
'not equal -> bash':
73+
'prefix': 'sc-ne',
74+
'body': """
75+
-ne 1ドル
76+
"""
77+
'less than -> bash':
78+
'prefix': 'sc-lt',
79+
'body': """
80+
-lt 1ドル
81+
"""
82+
'less than equal -> bash':
83+
'prefix': 'sc-le',
84+
'body': """
85+
-le 1ドル
86+
"""
87+
'greater than -> bash':
88+
'prefix': 'sc-gt',
89+
'body': """
90+
-gt 1ドル
91+
"""
92+
'greater than equal -> bash':
93+
'prefix': 'sc-ge',
94+
'body': """
95+
-ge 1ドル
96+
"""
97+
'if -> bash':
98+
'prefix': 's-if',
99+
'body': """
100+
if [ 1ドル ]; then
101+
# code
102+
fi
103+
"""
104+
'if -> else -> bash':
105+
'prefix': 's-if2',
106+
'body': """
107+
if [ 1ドル ]; then
108+
# code
109+
else
110+
# code
111+
fi
112+
"""
113+
'else if -> bash':
114+
'prefix': 's-if2',
115+
'body': """
116+
if [ 1ドル ]; then
117+
# code
118+
elif [ 1ドル ]; then
119+
# code
120+
else
121+
# code
122+
fi
123+
"""
124+
125+
'switch -> bash':
126+
'prefix': 's-switch',
127+
'body': """
128+
case condition1ドル in
129+
check)
130+
#code
131+
;;
132+
*)
133+
#code
134+
;;
135+
esac
136+
"""
137+
'case -> bash':
138+
'prefix': 's-case',
139+
'body': """
140+
check)
141+
#code
142+
;;
143+
"""
144+
'for in -> bash':
145+
'prefix': 's-forin',
146+
'body': """
147+
for i in 1ドル; do
148+
#code
149+
done
150+
"""
151+
'for -> bash':
152+
'prefix': 's-for',
153+
'body': """
154+
for (( i ; i < $n ; i++ )); do
155+
#code
156+
done
157+
"""
158+
'while -> bash':
159+
'prefix': 's-while',
160+
'body': """
161+
while [ condition ]; do
162+
#statements
163+
done
164+
"""
165+
'until -> bash':
166+
'prefix': 's-until',
167+
'body': """
168+
until [ condition ]; do
169+
#statements
170+
done
171+
"""
172+
173+
174+
'pipe -> bash':
175+
'prefix': 's-pipe',
176+
'body': """
177+
| 1ドル
178+
"""
179+
'and -> bash':
180+
'prefix': 's-and',
181+
'body': """
182+
&& 1ドル
183+
"""
184+
'or -> bash':
185+
'prefix': 's-or',
186+
'body': """
187+
|| 1ドル
188+
"""

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /