From 601e122e9fc94b3523d53e46eb734f54cfcc3134 Mon Sep 17 00:00:00 2001 From: mataha Date: Mon, 10 Jul 2023 21:58:17 +0200 Subject: [PATCH] ignore/types: add Windows Command Prompt files 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 --- crates/ignore/src/default_types.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/ignore/src/default_types.rs b/crates/ignore/src/default_types.rs index 06170752..e138067a 100644 --- a/crates/ignore/src/default_types.rs +++ b/crates/ignore/src/default_types.rs @@ -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", @@ -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"]),