From b65a02681a87eb61cecb81b34275bf877c82c062 Mon Sep 17 00:00:00 2001 From: Keith Hall Date: Fri, 17 Mar 2023 22:48:12 +0200 Subject: [PATCH] Add crontab syntax --- .gitmodules | 5 ++++- CHANGELOG.md | 1 + assets/syntaxes/02_Extra/Crontab | 1 + tests/syntax-tests/highlighted/Crontab/crontab.tab | 8 ++++++++ tests/syntax-tests/source/Crontab/crontab.tab | 8 ++++++++ 5 files changed, 22 insertions(+), 1 deletion(-) create mode 160000 assets/syntaxes/02_Extra/Crontab create mode 100644 tests/syntax-tests/highlighted/Crontab/crontab.tab create mode 100644 tests/syntax-tests/source/Crontab/crontab.tab diff --git a/.gitmodules b/.gitmodules index 2b0caad6..f84fdb08 100644 --- a/.gitmodules +++ b/.gitmodules @@ -250,4 +250,7 @@ [submodule "assets/syntaxes/02_Extra/Ada"] path = assets/syntaxes/02_Extra/Ada url = https://github.com/wiremoons/ada-sublime-syntax - \ No newline at end of file + +[submodule "assets/syntaxes/02_Extra/Crontab"] + path = assets/syntaxes/02_Extra/Crontab + url = https://github.com/michaelblyons/SublimeSyntax-Crontab diff --git a/CHANGELOG.md b/CHANGELOG.md index 013f00e4..7f723070 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ - Associate `pdm.lock` with `TOML` syntax, see #2410 - `Todo.txt`: Fix highlighting of contexts and projects at beginning of done.txt, see #2411 - `cmd-help`: overhaul scope names (colors) to improve theme support; misc syntax improvements. See #2419 (@victor-gp) +- Added support for Crontab, see #2509 (@keith-hall) ## Themes diff --git a/assets/syntaxes/02_Extra/Crontab b/assets/syntaxes/02_Extra/Crontab new file mode 160000 index 00000000..54f1fa7f --- /dev/null +++ b/assets/syntaxes/02_Extra/Crontab @@ -0,0 +1 @@ +Subproject commit 54f1fa7ff0c9d18aea3790555dba6e533ce3749b diff --git a/tests/syntax-tests/highlighted/Crontab/crontab.tab b/tests/syntax-tests/highlighted/Crontab/crontab.tab new file mode 100644 index 00000000..509309ea --- /dev/null +++ b/tests/syntax-tests/highlighted/Crontab/crontab.tab @@ -0,0 +1,8 @@ +0 2 * * * /bin/sh backup.sh +*/10 * * * * /home/maverick/check-disk-space +0 5,17 * * * /scripts/script.sh +0 2 * * sun [ $(date +%d) -le 07 ] && /script/script.sh +@daily /scripts/script.sh +@reboot /scripts/script.sh + +MAIL=bob diff --git a/tests/syntax-tests/source/Crontab/crontab.tab b/tests/syntax-tests/source/Crontab/crontab.tab new file mode 100644 index 00000000..a43bd995 --- /dev/null +++ b/tests/syntax-tests/source/Crontab/crontab.tab @@ -0,0 +1,8 @@ +0 2 * * * /bin/sh backup.sh +*/10 * * * * /home/maverick/check-disk-space +0 5,17 * * * /scripts/script.sh +0 2 * * sun [ $(date +%d) -le 07 ] && /script/script.sh +@daily /scripts/script.sh +@reboot /scripts/script.sh + +MAIL=bob