From 165c758fa135f0f1af7799d3969bdcc5bfa8e656 Mon Sep 17 00:00:00 2001 From: Jason Dent Date: Mon, 6 Jan 2025 08:52:42 +0100 Subject: [PATCH] fix: Update Bash dictionary (#3988) --- dictionaries/bash/cspell-tools.config.yaml | 2 ++ dictionaries/bash/dict/bash-words.txt | 9 +++++++++ dictionaries/bash/package.json | 2 +- dictionaries/shell/cspell-tools.config.yaml | 1 + dictionaries/shell/dict/bash-words.txt | 9 +++++++++ dictionaries/shell/package.json | 2 +- dictionaries/shell/src/command-words.txt | 1 + dictionaries/shell/src/glob-words.txt | 1 + dictionaries/shell/src/miscellaneous-words.txt | 1 + dictionaries/shell/src/shell-bash-words.txt | 1 + dictionaries/shell/src/shell-sh-words.txt | 1 + dictionaries/shell/src/shell-zsh-words.txt | 1 + dictionaries/shell/{src => test}/legacy-words.txt | 0 13 files changed, 29 insertions(+), 2 deletions(-) rename dictionaries/shell/{src => test}/legacy-words.txt (100%) diff --git a/dictionaries/bash/cspell-tools.config.yaml b/dictionaries/bash/cspell-tools.config.yaml index ec1ffb0bbd2..d2c79cc70fd 100644 --- a/dictionaries/bash/cspell-tools.config.yaml +++ b/dictionaries/bash/cspell-tools.config.yaml @@ -4,6 +4,8 @@ targets: - name: bash-words sources: - ./src/bash-words.txt + - listFile: ../shell/common-source-files.txt + - ../shell/src/shell-bash-words.txt format: plaintext targetDirectory: './dict' generateNonStrict: false diff --git a/dictionaries/bash/dict/bash-words.txt b/dictionaries/bash/dict/bash-words.txt index 5a2ff007cdf..b6faa07fd32 100644 --- a/dictionaries/bash/dict/bash-words.txt +++ b/dictionaries/bash/dict/bash-words.txt @@ -38,6 +38,7 @@ MACHTYPE MAIL MAILCHECK MAILPATH +MANPATH OLDPWD OPTARG OPTERR @@ -51,6 +52,7 @@ PPID PROMPT_COMMAND PS1 PS2 +PS3 PS4 READLINE_LINE READLINE_MARK @@ -72,6 +74,7 @@ UID alias allexport autoremove +bashscript bg bind braceexpand @@ -99,6 +102,7 @@ elif else emacs enable +enarmor errexit errtrace esac @@ -139,6 +143,8 @@ logout mapfile mkdir monitor +mvim +neovim newgidmap newuidmap noclobber @@ -147,6 +153,7 @@ noglob nolog notify nounset +nvim onecmd pgrep physical @@ -167,6 +174,7 @@ return select set shellcheck +shellscript shfmt shift shopt @@ -189,6 +197,7 @@ unset until verbose vi +vim wait while xtrace diff --git a/dictionaries/bash/package.json b/dictionaries/bash/package.json index 0ab6adfc419..6c16d900bdd 100644 --- a/dictionaries/bash/package.json +++ b/dictionaries/bash/package.json @@ -13,7 +13,7 @@ }, "scripts": { "build": "cspell-tools-cli build", - "test": "shx head -n 100 src/bash-words.txt | cspell -c ./cspell-ext.json \"--locale=*\" \"--languageId=shellscript\" stdin", + "test": "shx cat src/bash-words.txt | cspell -c ./cspell-ext.json \"--locale=*\" \"--languageId=shellscript\" stdin", "prepublishOnly": "echo pre-publish", "prepare:dictionary": "pnpm run build" }, diff --git a/dictionaries/shell/cspell-tools.config.yaml b/dictionaries/shell/cspell-tools.config.yaml index 8a79470d2d5..83dd584c891 100644 --- a/dictionaries/shell/cspell-tools.config.yaml +++ b/dictionaries/shell/cspell-tools.config.yaml @@ -5,6 +5,7 @@ targets: sources: - listFile: ./common-source-files.txt - ./src/shell-bash-words.txt + - ../bash/src/bash-words.txt format: plaintext targetDirectory: './dict' generateNonStrict: false diff --git a/dictionaries/shell/dict/bash-words.txt b/dictionaries/shell/dict/bash-words.txt index c26a1b44a6c..b6faa07fd32 100644 --- a/dictionaries/shell/dict/bash-words.txt +++ b/dictionaries/shell/dict/bash-words.txt @@ -40,6 +40,7 @@ MAILCHECK MAILPATH MANPATH OLDPWD +OPTARG OPTERR OPTIND OSTYPE @@ -87,6 +88,7 @@ compgen complete compopt continue +coproc dbus dearmor declare @@ -104,15 +106,18 @@ enarmor errexit errtrace esac +euxo eval exec exit export +fallocate false fc fg fi for +fstype function functrace getopts @@ -127,6 +132,8 @@ ignoreeof in inlib jobs +keymap +keymaps keyrings keyword kill @@ -148,6 +155,7 @@ notify nounset nvim onecmd +pgrep physical pipefail popd @@ -159,6 +167,7 @@ pushd pwd read readarray +readline readlink readonly return diff --git a/dictionaries/shell/package.json b/dictionaries/shell/package.json index 269e7a5b926..e207ce19c98 100644 --- a/dictionaries/shell/package.json +++ b/dictionaries/shell/package.json @@ -13,7 +13,7 @@ }, "scripts": { "build": "cspell-tools-cli build", - "test": "shx head -n 100 src/legacy-words.txt | cspell -c ./cspell-ext.json \"--locale=*\" \"--languageId=shellscript\" stdin", + "test": "shx cat test/legacy-words.txt | cspell -c ./cspell-ext.json \"--locale=*\" \"--languageId=shellscript\" stdin", "prepublishOnly": "echo pre-publish", "prepare:dictionary": "pnpm run build" }, diff --git a/dictionaries/shell/src/command-words.txt b/dictionaries/shell/src/command-words.txt index e72bdcdc87b..6aabc9bc293 100644 --- a/dictionaries/shell/src/command-words.txt +++ b/dictionaries/shell/src/command-words.txt @@ -1,3 +1,4 @@ +# General commands, functions, and tools chsh dbus dpkg diff --git a/dictionaries/shell/src/glob-words.txt b/dictionaries/shell/src/glob-words.txt index 33cc44f9ec9..a87896d947e 100644 --- a/dictionaries/shell/src/glob-words.txt +++ b/dictionaries/shell/src/glob-words.txt @@ -1,3 +1,4 @@ +# Common Environment and Glob related terms. BASH_ARGV0 BASH_COMPAT BASH_SOURCE diff --git a/dictionaries/shell/src/miscellaneous-words.txt b/dictionaries/shell/src/miscellaneous-words.txt index 6b28d5f163c..d0dc86cfaeb 100644 --- a/dictionaries/shell/src/miscellaneous-words.txt +++ b/dictionaries/shell/src/miscellaneous-words.txt @@ -1,3 +1,4 @@ +# Terms that are common to shell scripts but not a command, function, or keyword. alnum autoremove cntrl diff --git a/dictionaries/shell/src/shell-bash-words.txt b/dictionaries/shell/src/shell-bash-words.txt index f4acaf2dcb1..65184d7009a 100644 --- a/dictionaries/shell/src/shell-bash-words.txt +++ b/dictionaries/shell/src/shell-bash-words.txt @@ -1,3 +1,4 @@ +# Bash related terms bashscript braceexpand builtin diff --git a/dictionaries/shell/src/shell-sh-words.txt b/dictionaries/shell/src/shell-sh-words.txt index 933e67196a6..20cefd2590c 100644 --- a/dictionaries/shell/src/shell-sh-words.txt +++ b/dictionaries/shell/src/shell-sh-words.txt @@ -1,3 +1,4 @@ +# general shell functions and keyword shared across the various shells. alias allexport bg diff --git a/dictionaries/shell/src/shell-zsh-words.txt b/dictionaries/shell/src/shell-zsh-words.txt index dbb40413e4c..472053a4c85 100644 --- a/dictionaries/shell/src/shell-zsh-words.txt +++ b/dictionaries/shell/src/shell-zsh-words.txt @@ -1,3 +1,4 @@ +# zsh related terms --no-globalrcs ARCHFLAGS autoload diff --git a/dictionaries/shell/src/legacy-words.txt b/dictionaries/shell/test/legacy-words.txt similarity index 100% rename from dictionaries/shell/src/legacy-words.txt rename to dictionaries/shell/test/legacy-words.txt