update components

This commit is contained in:
Luke Pulverenti 2016-02-02 21:12:02 -05:00
parent 2a4b879c21
commit 63664e6c1c
1155 changed files with 62261 additions and 84 deletions

View file

@ -0,0 +1,53 @@
(( 4 + 5 ))
$((5 * 7))
"foo $((5 * 7)) bar"
for (( NUM=1 ; NUM<=1000 ; NUM++ ))
----------------------------------------------------
[
["variable", [
["punctuation", "(("],
["number", "4"],
["operator", "+"],
["number", "5"],
["punctuation", "))"]
]],
["variable", [
["variable", "$(("],
["number", "5"],
["operator", "*"],
["number", "7"],
["variable", "))"]
]],
["string", [
"\"foo ",
["variable", [
["variable", "$(("],
["number", "5"],
["operator", "*"],
["number", "7"],
["variable", "))"]
]],
" bar\""
]],
["keyword", "for"],
["variable", [
["punctuation", "(("],
" NUM",
["operator", "="],
["number", "1"],
["punctuation", ";"],
" NUM",
["operator", "<="],
["number", "1000"],
["punctuation", ";"],
" NUM",
["operator", "++"],
["punctuation", "))"]
]]
]
----------------------------------------------------
Checks arithmetic environments

View file

@ -0,0 +1,34 @@
$(echo foo)
`echo foo`
"$(echo foo) bar"
----------------------------------------------------
[
["variable", [
["variable", "$("],
["keyword", "echo"],
" foo",
["variable", ")"]
]],
["variable", [
["variable", "`"],
["keyword", "echo"],
" foo",
["variable", "`"]
]],
["string", [
"\"",
["variable", [
["variable", "$("],
["keyword", "echo"],
" foo",
["variable", ")"]
]],
" bar\""
]]
]
----------------------------------------------------
Checks for command substitution.

View file

@ -0,0 +1,13 @@
#foo
# bar
----------------------------------------------------
[
["comment", "#foo"],
["comment", "# bar"]
]
----------------------------------------------------
Checks for comments.

View file

@ -0,0 +1,101 @@
alias apropos apt-get aptitude aspell
awk basename bash bc bg
builtin bzip2 cal cat cd
cfdisk chgrp chmod chown chroot
chkconfig cksum clear cmp comm
command cp cron crontab csplit
cut date dc dd ddrescue
df diff diff3 dig dir dircolors
dirname dirs dmesg du
egrep eject enable env ethtool
eval exec expand expect
export expr fdformat fdisk
fg fgrep file find fmt
fold format free fsck ftp
fuser gawk getopts git grep
groupadd groupdel groupmod groups
gzip hash head help hg history
hostname htop iconv id ifconfig
ifdown ifup import install jobs
join kill killall less link ln
locate logname logout look lpc lpr
lprint lprintd lprintq lprm ls
lsof make man mkdir mkfifo
mkisofs mknod more most mount
mtools mtr mv mmv nano netstat
nice nl nohup notify-send nslookup
open op passwd paste pathchk ping
pkill popd pr printcap printenv
printf ps pushd pv pwd quota
quotacheck quotactl ram rar rcp
read readarray readonly reboot
rename renice remsync rev rm
rmdir rsync screen scp sdiff sed
seq service sftp shift
shopt shutdown sleep slocate
sort source split ssh stat strace
su sudo sum suspend sync tail tar
tee test time timeout times
touch top traceroute trap tr
tsort tty type ulimit umask
umount unalias uname unexpand uniq
units unrar unshar uptime
useradd userdel usermod users uuencode
uudecode v vdir vi vmstat wait watch
wc wget whereis which who whoami write
xargs xdg-open yes zip
----------------------------------------------------
[
["function", "alias"], ["function", "apropos"], ["function", "apt-get"], ["function", "aptitude"], ["function", "aspell"],
["function", "awk"], ["function", "basename"], ["function", "bash"], ["function", "bc"], ["function", "bg"],
["function", "builtin"], ["function", "bzip2"], ["function", "cal"], ["function", "cat"], ["function", "cd"],
["function", "cfdisk"], ["function", "chgrp"], ["function", "chmod"], ["function", "chown"], ["function", "chroot"],
["function", "chkconfig"], ["function", "cksum"], ["function", "clear"], ["function", "cmp"], ["function", "comm"],
["function", "command"], ["function", "cp"], ["function", "cron"], ["function", "crontab"], ["function", "csplit"],
["function", "cut"], ["function", "date"], ["function", "dc"], ["function", "dd"], ["function", "ddrescue"],
["function", "df"], ["function", "diff"], ["function", "diff3"], ["function", "dig"], ["function", "dir"], ["function", "dircolors"],
["function", "dirname"], ["function", "dirs"], ["function", "dmesg"], ["function", "du"],
["function", "egrep"], ["function", "eject"], ["function", "enable"], ["function", "env"], ["function", "ethtool"],
["function", "eval"], ["function", "exec"], ["function", "expand"], ["function", "expect"],
["function", "export"], ["function", "expr"], ["function", "fdformat"], ["function", "fdisk"],
["function", "fg"], ["function", "fgrep"], ["function", "file"], ["function", "find"], ["function", "fmt"],
["function", "fold"], ["function", "format"], ["function", "free"], ["function", "fsck"], ["function", "ftp"],
["function", "fuser"], ["function", "gawk"], ["function", "getopts"], ["function", "git"], ["function", "grep"],
["function", "groupadd"], ["function", "groupdel"], ["function", "groupmod"], ["function", "groups"],
["function", "gzip"], ["function", "hash"], ["function", "head"], ["function", "help"], ["function", "hg"], ["function", "history"],
["function", "hostname"], ["function", "htop"], ["function", "iconv"], ["function", "id"], ["function", "ifconfig"],
["function", "ifdown"], ["function", "ifup"], ["function", "import"], ["function", "install"], ["function", "jobs"],
["function", "join"], ["function", "kill"], ["function", "killall"], ["function", "less"], ["function", "link"], ["function", "ln"],
["function", "locate"], ["function", "logname"], ["function", "logout"], ["function", "look"], ["function", "lpc"], ["function", "lpr"],
["function", "lprint"], ["function", "lprintd"], ["function", "lprintq"], ["function", "lprm"], ["function", "ls"],
["function", "lsof"], ["function", "make"], ["function", "man"], ["function", "mkdir"], ["function", "mkfifo"],
["function", "mkisofs"], ["function", "mknod"], ["function", "more"], ["function", "most"], ["function", "mount"],
["function", "mtools"], ["function", "mtr"], ["function", "mv"], ["function", "mmv"], ["function", "nano"], ["function", "netstat"],
["function", "nice"], ["function", "nl"], ["function", "nohup"], ["function", "notify-send"], ["function", "nslookup"],
["function", "open"], ["function", "op"], ["function", "passwd"], ["function", "paste"], ["function", "pathchk"], ["function", "ping"],
["function", "pkill"], ["function", "popd"], ["function", "pr"], ["function", "printcap"], ["function", "printenv"],
["function", "printf"], ["function", "ps"], ["function", "pushd"], ["function", "pv"], ["function", "pwd"], ["function", "quota"],
["function", "quotacheck"], ["function", "quotactl"], ["function", "ram"], ["function", "rar"], ["function", "rcp"],
["function", "read"], ["function", "readarray"], ["function", "readonly"], ["function", "reboot"],
["function", "rename"], ["function", "renice"], ["function", "remsync"], ["function", "rev"], ["function", "rm"],
["function", "rmdir"], ["function", "rsync"], ["function", "screen"], ["function", "scp"], ["function", "sdiff"], ["function", "sed"],
["function", "seq"], ["function", "service"], ["function", "sftp"], ["function", "shift"],
["function", "shopt"], ["function", "shutdown"], ["function", "sleep"], ["function", "slocate"],
["function", "sort"], ["function", "source"], ["function", "split"], ["function", "ssh"], ["function", "stat"], ["function", "strace"],
["function", "su"], ["function", "sudo"], ["function", "sum"], ["function", "suspend"], ["function", "sync"], ["function", "tail"], ["function", "tar"],
["function", "tee"], ["function", "test"], ["function", "time"], ["function", "timeout"], ["function", "times"],
["function", "touch"], ["function", "top"], ["function", "traceroute"], ["function", "trap"], ["function", "tr"],
["function", "tsort"], ["function", "tty"], ["function", "type"], ["function", "ulimit"], ["function", "umask"],
["function", "umount"], ["function", "unalias"], ["function", "uname"], ["function", "unexpand"], ["function", "uniq"],
["function", "units"], ["function", "unrar"], ["function", "unshar"], ["function", "uptime"],
["function", "useradd"], ["function", "userdel"], ["function", "usermod"], ["function", "users"], ["function", "uuencode"],
["function", "uudecode"], ["function", "v"], ["function", "vdir"], ["function", "vi"], ["function", "vmstat"], ["function", "wait"], ["function", "watch"],
["function", "wc"], ["function", "wget"], ["function", "whereis"], ["function", "which"], ["function", "who"], ["function", "whoami"], ["function", "write"],
["function", "xargs"], ["function", "xdg-open"], ["function", "yes"], ["function", "zip"]
]
----------------------------------------------------
Checks for all functions.

View file

@ -0,0 +1,20 @@
if then else elif fi
for break continue while
in case function select
do done until echo exit
return set declare
. :
----------------------------------------------------
[
["keyword", "if"], ["keyword", "then"], ["keyword", "else"], ["keyword", "elif"], ["keyword", "fi"],
["keyword", "for"], ["keyword", "break"], ["keyword", "continue"], ["keyword", "while"],
["keyword", "in"], ["keyword", "case"], ["keyword", "function"], ["keyword", "select"],
["keyword", "do"], ["keyword", "done"], ["keyword", "until"], ["keyword", "echo"], ["keyword", "exit"],
["keyword", "return"], ["keyword", "set"], ["keyword", "declare"],
["keyword", "."], ["keyword", ":"]
]
----------------------------------------------------
Checks for all keywords.

View file

@ -0,0 +1,11 @@
#!/bin/bash
----------------------------------------------------
[
["shebang", "#!/bin/bash"]
]
----------------------------------------------------
Checks for shebang.

View file

@ -0,0 +1,60 @@
""
''
"foo"
'foo'
"foo
bar"
'foo
bar'
"'foo'"
'"bar"'
"$@"
"${foo}"
<< STRING_END
foo
bar
STRING_END
<< EOF
foo $@
bar
EOF
<< 'EOF'
'single quoted string'
"double quoted string"
EOF
<< "EOF"
foo
bar
EOF
----------------------------------------------------
[
["string", ["\"\""]],
["string", ["''"]],
["string", ["\"foo\""]],
["string", ["'foo'"]],
["string", ["\"foo\r\nbar\""]],
["string", ["'foo\r\nbar'"]],
["string", ["\"'foo'\""]],
["string", ["'\"bar\"'"]],
["string", [
"\"", ["variable", "$@"], "\""
]],
["string", [
"\"", ["variable", "${foo}"], "\""
]],
["operator", "<<"],
["string", ["STRING_END\r\nfoo\r\nbar\r\nSTRING_END"]],
["operator", "<<"],
["string", ["EOF\r\nfoo ", ["variable", "$@"], "\r\nbar\r\nEOF"]],
["operator", "<<"],
["string", ["'EOF'\r\n'single quoted string'\r\n\"double quoted string\"\r\nEOF"]],
["operator", "<<"],
["string", ["\"EOF\"\r\nfoo\r\nbar\r\nEOF"]]
]
----------------------------------------------------
Checks for single-quoted and double-quoted strings.
Also checks for variables in strings.

View file

@ -0,0 +1,15 @@
$foo
$@
${foo bar}
----------------------------------------------------
[
["variable", "$foo"],
["variable", "$@"],
["variable", "${foo bar}"]
]
----------------------------------------------------
Checks for variables.