Skip to content

Commit 1747740

Browse files
committed
Update github open
1 parent 2ec873b commit 1747740

File tree

2 files changed

+50
-42
lines changed

2 files changed

+50
-42
lines changed

about.sh

Lines changed: 49 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -13,37 +13,37 @@
1313

1414

1515
Usage(){
16-
echo "usage: curl -Ls about.magcho.com | sh
16+
echo "usage: curl -Ls about.magcho.com | sh
1717
magcho's self-introduction
1818
1919
How to execute subcommands
20-
Ex.) curl -Ls about.magcho.com | sh -s help
20+
e.g.) curl -Ls about.magcho.com | sh -s help
2121
"
2222
}
2323
Help(){
24-
echo "subcommands:
24+
echo "subcommands:
2525
help Display the help message
2626
more Display full the magcho's introduction
2727
tw Visit to magcho's twitter
2828
hp Visit to magcho.com"
2929
}
3030
Intro(){
31-
echo " | \033[32mName:\033[m magcho |
31+
echo " | \033[32mName:\033[m magcho |
3232
| \033[034mTwitter:\033[039m https://twitter.com/magcho0527 |
3333
| \033[36mMail:\033[m [email protected] |
3434
| \033[31mHP:\033[m https://magcho.com |"
3535
}
3636
IntroMore(){
3737

38-
if echo "$EDITOR" | grep 'emacs' > /dev/null; then
39-
EDITOR_MESS=" (You'er emacser!! Let's be friends!) |"
40-
elif echo "$EDITOR" | grep 'vim' > /dev/null; then
41-
EDITOR_MESS=" (YOU ARE VIMMER??? SHALL WE USE EMACS?) |"
42-
else
43-
EDITOR_MESS=" (Shall we use Emacs?) |"
44-
fi
38+
if echo "$EDITOR" | grep 'emacs' > /dev/null; then
39+
EDITOR_MESS=" (You'er emacser!! Let's be friends!) |"
40+
elif echo "$EDITOR" | grep 'vim' > /dev/null; then
41+
EDITOR_MESS=" (YOU ARE VIMMER??? SHALL WE USE EMACS?) |"
42+
else
43+
EDITOR_MESS=" (Shall we use Emacs?) |"
44+
fi
4545

46-
echo " | Blog: https://blog.magcho.com |
46+
echo " | Blog: https://blog.magcho.com |
4747
| Github: https://github.com/magcho |
4848
| Name: Suetake Dai |
4949
| Age: 22 |
@@ -53,40 +53,48 @@ echo " | Blog: https://blog.magcho.com |
5353
|$EDITOR_MESS"
5454
}
5555
Open(){
56-
if [ $1 = tw ]; then
57-
open https://twitter.com/magcho0527
58-
elif [ $1 = hp ]; then
59-
open https://magcho.com
60-
fi
56+
if [ $1 = tw ]; then
57+
echo 'open twitter: https://twitter.com/magcho0527'
58+
open https://twitter.com/magcho0527
59+
elif [ $1 = hp ]; then
60+
echo 'open HP: https://magcho.com'
61+
open https://magcho.com
62+
elif [ $1 = gh ]; then
63+
echo 'open GitHub: https://github.com/magcho/'
64+
open https://github.com/magcho/
65+
fi
6166
}
6267
PrintLine(){
63-
echo " ==============================================="
68+
echo " ==============================================="
6469
}
6570

6671

6772

6873
case $1 in
69-
help)
70-
Usage
71-
Help
72-
;;
73-
more)
74-
Usage
75-
PrintLine
76-
Intro
77-
IntroMore
78-
PrintLine
79-
;;
80-
tw)
81-
Open tw
82-
;;
83-
hp)
84-
Open hp
85-
;;
86-
*)
87-
Usage
88-
PrintLine
89-
Intro
90-
PrintLine
91-
;;
74+
help)
75+
Usage
76+
Help
77+
;;
78+
more)
79+
Usage
80+
PrintLine
81+
Intro
82+
IntroMore
83+
PrintLine
84+
;;
85+
tw)
86+
Open tw
87+
;;
88+
hp)
89+
Open hp
90+
;;
91+
gh)
92+
Open gh
93+
;;
94+
*)
95+
Usage
96+
PrintLine
97+
Intro
98+
PrintLine
99+
;;
92100
esac

test/success_output.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ usage: curl -Ls about.magcho.com | sh
22
magcho's self-introduction
33

44
How to execute subcommands
5-
Ex.) curl -Ls about.magcho.com | sh -s help
5+
e.g.) curl -Ls about.magcho.com | sh -s help
66

77
===============================================
88
| Name: magcho |

0 commit comments

Comments
 (0)