Skip to content

Commit

Permalink
Add Cron table language (#6759)
Browse files Browse the repository at this point in the history
* Add Crontab language

Resolves #6547

* Use 'TCL' ace mode

Co-authored-by: John Gardner <gardnerjohng@gmail.com>

* Add colour

Co-authored-by: John Gardner <gardnerjohng@gmail.com>

* Fix test runner errors

* Fix grammar key

* Update vendor/licenses/git_submodule/cron.tmbundle.dep.yml

---------

Co-authored-by: John Gardner <gardnerjohng@gmail.com>
Co-authored-by: Colin Seymour <colin@github.com>
  • Loading branch information
3 people committed Jun 7, 2024
1 parent 692dbb9 commit 03c51e9
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,9 @@
[submodule "vendor/grammars/creole"]
path = vendor/grammars/creole
url = https://github.com/Siddley/Creole
[submodule "vendor/grammars/cron.tmbundle"]
path = vendor/grammars/cron.tmbundle
url = https://github.com/textmate/cron.tmbundle
[submodule "vendor/grammars/csharp-tmLanguage"]
path = vendor/grammars/csharp-tmLanguage
url = https://github.com/dotnet/csharp-tmLanguage
Expand Down
2 changes: 2 additions & 0 deletions grammars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,8 @@ vendor/grammars/cpp-qt.tmbundle:
- source.qmake
vendor/grammars/creole:
- text.html.creole
vendor/grammars/cron.tmbundle:
- text.crontab
vendor/grammars/csharp-tmLanguage:
- source.cs
vendor/grammars/cucumber-tmbundle:
Expand Down
11 changes: 11 additions & 0 deletions lib/linguist/languages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8246,6 +8246,17 @@ cURL Config:
tm_scope: source.curlrc
ace_mode: text
language_id: 992375436
crontab:
type: data
color: "#ead7ac"
aliases:
- cron
- cron table
filenames:
- crontab
tm_scope: text.crontab
ace_mode: tcl
language_id: 705203557
desktop:
type: data
extensions:
Expand Down
7 changes: 7 additions & 0 deletions samples/crontab/filenames/crontab
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# m h dom mon dow command
0 22 * * 1,3 /usr/local/bin/whistleblower > /opt/crontab.log 2>&1
0 17 * * 2,4 /usr/local/bin/whistleblower > /opt/crontab.log 2>&1
0 13 * * 5 /usr/local/bin/whistleblower > /opt/crontab.log 2>&1
0 1 * * 1 /usr/local/bin/update > /opt/crontab.log 2>&1
0 4 * * * /usr/local/bin/cleanup > /opt/crontab.log 2>&1
0 4 * * 1 /usr/local/bin/receipts > /opt/crontab.log 2>&1
1 change: 1 addition & 0 deletions vendor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -649,6 +649,7 @@ This is a list of grammars that Linguist selects to provide syntax highlighting
- **Zephir:** [phalcon/zephir-sublime](https://github.com/phalcon/zephir-sublime)
- **Zig:** [ziglang/sublime-zig-language](https://github.com/ziglang/sublime-zig-language)
- **cURL Config:** [Alhadis/language-etc](https://github.com/Alhadis/language-etc)
- **crontab:** [textmate/cron.tmbundle](https://github.com/textmate/cron.tmbundle)
- **desktop:** [Mailaender/desktop.tmbundle](https://github.com/Mailaender/desktop.tmbundle)
- **dircolors:** [jolkdarr/language-dircolors](https://github.com/jolkdarr/language-dircolors)
- **eC:** [ecere/ec.tmbundle](https://github.com/ecere/ec.tmbundle)
Expand Down
1 change: 1 addition & 0 deletions vendor/grammars/cron.tmbundle
Submodule cron.tmbundle added at f027bc
17 changes: 17 additions & 0 deletions vendor/licenses/git_submodule/cron.tmbundle.dep.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
type: git_submodule
name: cron.tmbundle
version: f027bc74d926b8bdc0bfaac22a419d351bf60edd
license: permissive
licenses:
- text: >
If not otherwise specified (see below), files in this repository fall under the following license:
Permission to copy, use, modify, sell and distribute this
software is granted. This software is provided "as is" without
express or implied warranty, and with no claim as to its
suitability for any purpose.
An exception is made for files in readable text which contain their own license information, or files where an accompanying file exists (in the same directory) with a “-license” suffix added to the base-name name of the original file, and an extension of txt, html, or similar. For example “tidy” is accompanied by “tidy-license.txt”.
notices: []

0 comments on commit 03c51e9

Please sign in to comment.