Skip to content

Commit

Permalink
ignore/types: add Windows Command Prompt files
Browse files Browse the repository at this point in the history
This PR adds `*.bat` and `*.cmd` file types.

In doing so, it makes a distinction between batch files (old standard
from the MS-DOS era) and command scripts (new flavor - can operate on
batch files, although `*.cmd` is preferred for various reasons, the
main one being batch files will set `ERRORLEVEL` following inconsistent
MS-DOS style rules[1]).

PR #2556

[1]: https://groups.google.com/g/microsoft.public.win2000.cmdprompt.admin/c/XHeUq8oe2wk/m/LIEViGNmkK0J#i106
  • Loading branch information
mataha authored Jul 10, 2023
1 parent efb2e8c commit 601e122
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crates/ignore/src/default_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ pub const DEFAULT_TYPES: &[(&[&str], &[&str])] = &[
(&["ats"], &["*.ats", "*.dats", "*.sats", "*.hats"]),
(&["avro"], &["*.avdl", "*.avpr", "*.avsc"]),
(&["awk"], &["*.awk"]),
(&["bat", "batch"], &["*.bat"]),
(&["bazel"], &[
"*.bazel", "*.bzl", "*.BUILD", "*.bazelrc", "BUILD", "MODULE.bazel",
"WORKSPACE", "WORKSPACE.bazel",
Expand All @@ -40,6 +41,7 @@ pub const DEFAULT_TYPES: &[(&[&str], &[&str])] = &[
(&["ceylon"], &["*.ceylon"]),
(&["clojure"], &["*.clj", "*.cljc", "*.cljs", "*.cljx"]),
(&["cmake"], &["*.cmake", "CMakeLists.txt"]),
(&["cmd"], &["*.bat", "*.cmd"]),
(&["cml"], &["*.cml"]),
(&["coffeescript"], &["*.coffee"]),
(&["config"], &["*.cfg", "*.conf", "*.config", "*.ini"]),
Expand Down

0 comments on commit 601e122

Please sign in to comment.