-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathbash-templates.lua
91 lines (79 loc) · 3.78 KB
/
bash-templates.lua
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
sentence_command_templates = {
{"$commands.list in $files.directory", {"ls", "$files.directory"}},
{"$commands.list in $files.directory by $files.sort", {"ls", "$files.sort", "$files.directory"}},
{"find the $files.sort files in $files.directory", {"ls", "$files.sort", "$files.directory"}},
{"find all $files.ext files in $files.directory", {"find", "$files.directory", "-name", "$files.ext"}},
{"$commands.remove $files.directory", {"rm", "-r", "$files.directory"}},
{"$commands.remove $files.file", {"rm", "$files.file"}},
{"$commands.move $files.file to $files.directory", {"mv", "$files.file", "$files.directory"}},
{"$commands.copy $files.file to $files.directory", {"cp", "$files.file", "$files.directory"}},
{"$commands.open $apps.app", {"open", "$apps.app"}},
{"$commands.read $files.file", {"cat", "$files.file"}},
{"$commands.size $files.directory", {"du", "$files.directory"}},
{"$commands.date", {"date"}},
{"count $words.count of $files.file", {"wc", "$files.file"}},
}
argument_values = {
words = {
count = {_ = {"lines", "words", "bytes"}},
},
commands = {
date = {_ = {"date", "time", "what time is it", "what day is it?", "what is it today?"}},
list = {_ = {"list", "find files", "show everything"}},
read = {_ = {"read", "print out"}},
move = {_ = {"move"}},
copy = {_ = {"copy"}},
remove = {_ = {"remove", "delete"}},
open = {_ = {"open", "start"}},
size = {_ = {"how big is", "how much size is"}},
},
files = {
archivename = {_ = {"files.tgz", "ball.tar.gz", "stuff.tgz"}},
file = {
["~/.ssh/config"] = {"my ssh config"},
["~/Notes.txt"] = {"my notes file", "notes"},
["~/.aliases"] = {"my aliases file"},
["~/.aliases"] = {"my aliases file"},
["~/.bash_history"] = {"bash history", "my history file"},
["/var/nginx/conf/nginx.conf"] = {"nginx config", "the server configuration"},
["/etc/redis/redis.conf"] = {"redis config", "the cache configuration"},
["/usr/local/var/postgres/postgresql.conf"] = {"psql config", "postgres config", "the database configuration"},
},
directory = {
["~"] = {"home", "my home directory", "my files", "my main folder"},
["~/Projects"] = {"my projects dir", "projects", "the projects folder"},
["~/Desktop"] = {"my desktop", "the desktop"},
["~/Downloads"] = {"my downloads folder", "downloads"},
["/"] = {"root", "the root directory", "the base dir"},
["/Applications"] = {"applications", "apps", "the main applications folder"},
["/tmp"] = {"temporary", "temp"},
},
sort = {
["-lt"] = {"oldest"},
["-ltr"] = {"newest", "most recent"},
["-lS"] = {"smallest", "small"},
["-lSr"] = {"biggest", "large"},
},
ext = {
["*.txt"] = {"text", "plain text"},
["*.conf"] = {"config", "configuration"},
["*.swp"] = {"vim temp", "temporary editor"},
["*.py"] = {"python"},
["*.js"] = {"js", "javscript"},
["*.coffee"] = {"coffee", "coffee script", "coffeescript"},
},
},
apps = {
app = {
["/Applications/iTunes.app"] = {"itunes", "music"},
["/Applications/Sketch.app"] = {"sketch", "the vector editor"},
["/Applications/Terminal.app"] = {"terminal", "the command line"},
},
},
}
noise_pre = {
"hello computer", "hi, ", "could you", "please", "computer, will you please", "i would like you to", "yo"
}
noise_post = {
"pretty please", "please", "ok?", "if you would", ", or else", "now", "if that's ok"
}