-
Notifications
You must be signed in to change notification settings - Fork 35
Links
npm install (with no args, in package dir) npm install [<@scope>/] npm install [<@scope>/]@ npm install [<@scope>/]@ npm install [<@scope>/]@ npm install @npm: npm install :/ npm install npm install npm install npm install
aliases: npm i, npm add common options: [-P|--save-prod|-D|--save-dev|-O|--save-optional|--save-peer] [-E|--save-exact] [-B|--save-bundle] [--no-save] [--dry-run]
``{
name: [“Shell”, “.sh”, “.rc”, “.bash”, “.bashrc”, “.ash”, “.zsh”]
colors: [
“variable”, #407095, #6A8099
“keyword2”, #0000EF, #8876BA
“funName”, #C57633, #FFC66D
“path” > “type”
]
comment: {startsWith: “#”}
contains: [
{match: /\$#/, 0: "default"} // $#组合在一起时,防止被识别成注释
// {match: /\$([a-zA-Z_]\w*|[?#$@0-9])/, 0: "variable"}
{
color: “variable”
start: {match: /\$\{/}
end: {match: /\}/}
contains: [
{match: /\\./, 0: "strEscape"}
{builtin: #QUOTED_STRING#}
]
}
{
color: “string”
start: {match: /“/}
end: {match: /(?m)”|$/}
contains: [
// 复制上面的
{match: /\$([a-zA-Z_]\w|[?#$@0-9])/, 0: "variable"}
{
color: “variable”
start: {match: /\$\{/}
end: {match: /\}/}
contains: [
{match: /\\./, 0: "strEscape"}
{builtin: #QUOTED_STRING#}
]
}
]
}
{builtin: #SINGLE_QUOTED_STRING#}
{match: /(?<!\.)/ + keywordsToRegex(
“umask wm set acpid add-shell addgroup adduser adjtimex ar arp arping ash awk base64 basename bash bc bbconfig”
“beep blkdiscard blkid blockdev bootchartd brctl bunzip2 bzcat bzip2 cal cat cd chat chattr chcon chgrp chmod”
“chown chpasswd chpst chroot chrt chvt cksum clear cmp comm conspy cp cpio crond crontab cryptpw cttyhack cut”
“date dc dd deallocvt delgroup deluser depmod devmem df dhcprelay diff dirname dmesg dnsd dnsdomainname dos2unix”
“dpkg dpkg-deb du dumpkmap dumpleases echo ed egrep eject env envdir envuidgid ether-wake expand expr factor”
“fakeidentd fallocate false fatattr fbset fbsplash fdflush fdformat fdisk fgconsole fgrep find findfs flash_eraseall”
“flash_lock flash_unlock flashcp flock fold free freeramdisk fsck fsck.minix fsfreeze fstrim fsync ftpd ftpget ftpput”
“fuser getenforce getopt getsebool getty git grep groups gunzip gzip halt hd hdparm head hexdump hostid hostname httpd”
“hush hwclock i2cdetect i2cdump i2cget i2cset id ifconfig ifdown ifenslave ifplugd ifup inetd inotifyd insmod install”
“ionice iostat ip ipaddr ipcalc ipcrm ipcs iplink ipneigh iproute iprule iptunnel kbd_mode kill killall killall5 klogd”
“last less link linux32 linux64 linuxrc ln load_policy loadfont loadkmap logger login logname logread losetup lpd lpq lpr”
“ls lsattr lsmod lsof lspci lsscsi lsusb lunzip lzcat lzip lzma lzop lzopcat makedevs makemime man matchpathcon md5sum mdev”
“mesg microcom mkdir mkdosfs mke2fs mkfifo mkfs.ext2 mkfs.minix mkfs.reiser mkfs.vfat mknod mkpasswd mkswap mktemp modinfo”
“modprobe more mount mountpoint mpstat msh mt mv nameif nanddump nandwrite nbd-client nc netstat nice nl nmeter nohup nproc”
“nsenter nslookup ntpd od openvt partprobe passwd paste patch pgrep pidof ping ping6 pipe_progress pivot_root pkill”
“pmap popmaildir poweroff powertop printenv printf ps pscan pstree pwd pwdx raidautorun rdate rdev read readahead readlink”
“readprofile realpath reboot reformime remove-shell renice reset resize restorecon rev rfkill rm rmdir rmmod route rpm”
“rpm2cpio rtcwake run-parts runcon runlevel runsv runsvdir rx script scriptreplay sed selinuxenabled sendmail seq sestatus”
“setarch setconsole setenforce setfiles setfont setkeycodes setlogcons setpriv setsebool setserial setsid setuidgid sh sha1sum”
“sha256sum sha3sum sha512sum showkey shred shuf slattach sleep smemcap softlimit sort split ssl_client start-stop-daemon stat”
“strings stty su sudo sulogin sum sv svc svlogd swapoff swapon switch_root sync sysctl syslogd tac tail tar taskset tcpsvd tee”
“telnet telnetd test tftp tftpd time timeout top touch tr traceroute traceroute6 true truncate tty ttysize tunctl tune2fs”
“ubiattach ubidetach ubimkvol ubirename ubirmvol ubirsvol ubiupdatevol udhcpc udhcpc6 udhcpd udpsvd uevent umount uname”
“uncompress unexpand uniq unix2dos unlink unlzma unlzop unshare unxz unzip uptime users usleep uudecode uuencode vconfig”
“vi vlock volname w wall watch watchdog wc wget which who whoami whois xargs xxd xz xzcat yes zcat zcip arch hexedit nuke”
“nologin resume svok setfattr tc zip export exec curl unset whereis eval pm am source exit return wait until let fasle alia# # ## ### s”
“unalias monkey uninstall arch hexedit nuke nologin resume svok tc zip acpi hexedit nuke nologin resume svok setfattr getfattr”
“getprop netcat iorenice sendevent setfattr setprop sha224sum sha384sum ulimit vmstat write symlink bg bind builtin caller”
“command compgen complete compopt dirs disown enable fc fg getopts hash help history jobs logout mapfile popd pushd shift”
“shopt suspend times trap type”
), 0: "keyword"}
{match: /(?<!\.)/ + keywordsToRegex(
“if then else elif fi for while in do done case esac readonly break continue declare local typeset”
), 0: "keyword2"}
{match: /(?m)^\s(for)\s*\(/, 1: "keyword2"} // 避免"for()"被下面的表达式高亮
{match: /(?m)^\s*(function\s+)?(\w+)\s*\(/, 1: “keyword”, 2: "funName"}
{match: “(https?|ftp|file)://[-A-Za-z0-9+&#/%?=~_|!:,.;]+[-A-Za-z0-9+&
#/%=~_|]”, 0: "path"}
{match: /[\w\-\u0080-\uffff#$.,]*(\/[\w\-\u0080-\uffff#$.,])\/?/, 0: "path"}
]
}