-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.mkd.fish-backup
42 lines (38 loc) · 1.03 KB
/
.mkd.fish-backup
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
function mkd
if count $argv <3
set $newdir $argv
set $newdir $argv[-1]
set $flags $argv[1..-2]
set $firstFlag $argv[1]
set $otherFlags $argv[2..-1]
mkdir $newdir
if test -n "$firstFlag" = -f
for file in "$otherFlags"
touch "$file"
end
end
function makefiles
for file in "$argv"
touch "$file"
end
end
for flag in $flags
switch "$flag"
case -x --nocd
ls
case -n --npm
cd $newdir
npm init -y
case -g --git
cd $newdir
git init
case -w --web
cd $newdir
mkdir scripts styles
touch index.html index.js styles/styles.css README.md
ls
case '*'
cd $newdir
end
end
end