Skip to content

Commit

Permalink
Move shell script words into their own package.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason3S committed Nov 12, 2022
1 parent 6868bff commit 8d66a8f
Show file tree
Hide file tree
Showing 22 changed files with 554 additions and 36 deletions.
8 changes: 0 additions & 8 deletions dictionaries/bash/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,6 @@ The `cspell-ext.json` file in this package should be added to the import section
}
```

## Building

Building is only necessary if you want to modify the contents of the dictionary. Note: Building will take a few minutes for large files.

```sh
npm run build
```

## License

MIT
Expand Down
16 changes: 3 additions & 13 deletions dictionaries/bash/cspell-ext.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,20 @@
{
"id": "shellscript",
"name": "ShellScript",
"description": "ShellScript dictionary for cspell.",
"id": "bash",
"name": "bash",
"description": "Bash dictionary for cspell.",
"readonly": true,
"dictionaryDefinitions": [
{
"name": "bash",
"path": "./dict/bash-words.txt",
"description": "Bash dictionary for cspell."
},
{
"name": "shellscript",
"path": "./dict/shell-all-words.txt",
"description": "ShellScript dictionary for cspell."
}
],
"dictionaries": [],
"languageSettings": [
{
"languageId": "shellscript",
"locale": "*",
"dictionaries": ["shellscript"]
},
{
"languageId": "bashscript",
"locale": "*",
"dictionaries": ["bash"]
}
]
Expand Down
11 changes: 1 addition & 10 deletions dictionaries/bash/cspell-tools.config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,7 @@
targets:
- name: bash-words
sources:
- listFile: ./common-source-files.txt
- ./src/shell-bash-words.txt
format: plaintext
targetDirectory: "./dict"
generateNonStrict: false
- name: shell-all-words
sources:
- listFile: ./common-source-files.txt
- ./src/shell-bash-words.txt
- ./src/shell-zsh-words.txt
- ./src/bash-words.txt
format: plaintext
targetDirectory: "./dict"
generateNonStrict: false
2 changes: 1 addition & 1 deletion dictionaries/bash/cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"**/*.{md,txt}"
],
"dictionaries": [
"shellscript"
"bash"
],
"import": [
"./cspell-ext.json"
Expand Down
6 changes: 2 additions & 4 deletions dictionaries/bash/dict/bash-words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ PPID
PROMPT_COMMAND
PS1
PS2
PS3
PS4
READLINE_LINE
READLINE_MARK
Expand All @@ -72,6 +71,7 @@ UID
alias
allexport
autoremove
bashscript
bg
bind
braceexpand
Expand All @@ -85,6 +85,7 @@ compgen
complete
compopt
continue
coproc
dbus
dearmor
declare
Expand All @@ -98,7 +99,6 @@ elif
else
emacs
enable
enarmor
errexit
errtrace
esac
Expand Down Expand Up @@ -142,7 +142,6 @@ noglob
nolog
notify
nounset
nvim
onecmd
physical
pipefail
Expand Down Expand Up @@ -183,7 +182,6 @@ unset
until
verbose
vi
vim
wait
while
xtrace
1 change: 1 addition & 0 deletions dictionaries/shell/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Change Log
21 changes: 21 additions & 0 deletions dictionaries/shell/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2017-2020 Jason Dent <jason@streetsidesoftware.nl>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
45 changes: 45 additions & 0 deletions dictionaries/shell/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# CSpell Shell Script Dictionary

Shell Script dictionary for cspell.

This is a pre-built dictionary for use with cspell.

## Requirements

| Tool | Version |
| ------------------------------------------------------------------------------------------------------------------------------------ | ------- |
| [cspell](https://github.com/streetsidesoftware/cspell) | `>= 6` |
| [Code Spell Checker - Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker) | `>= 2` |

## Installation

Global Install and add to cspell global settings.

```sh
npm install -g @cspell/dict-shell
cspell link add @cspell/dict-shell
```

## Uninstall from cspell

```sh
cspell link remove @cspell/dict-shell
```

## Manual Installation

The `cspell-ext.json` file in this package should be added to the import section in your cspell.json file.

```javascript
{
//
"import": ["@cspell/dict-shell/cspell-ext.json"],
//
}
```

## License

MIT

> Some packages may have other licenses included.
File renamed without changes.
31 changes: 31 additions & 0 deletions dictionaries/shell/cspell-ext.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"id": "shellscript",
"name": "ShellScript",
"description": "ShellScript dictionary for cspell.",
"readonly": true,
"dictionaryDefinitions": [
{
"name": "bash",
"path": "./dict/bash-words.txt",
"description": "Bash dictionary for cspell."
},
{
"name": "shellscript",
"path": "./dict/shell-all-words.txt",
"description": "ShellScript dictionary for cspell."
}
],
"dictionaries": [],
"languageSettings": [
{
"languageId": "shellscript",
"locale": "*",
"dictionaries": ["shellscript"]
},
{
"languageId": "bashscript",
"locale": "*",
"dictionaries": ["bash"]
}
]
}
18 changes: 18 additions & 0 deletions dictionaries/shell/cspell-tools.config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/streetsidesoftware/cspell/main/packages/cspell-tools/cspell-tools.config.schema.json

targets:
- name: bash-words
sources:
- listFile: ./common-source-files.txt
- ./src/shell-bash-words.txt
format: plaintext
targetDirectory: "./dict"
generateNonStrict: false
- name: shell-all-words
sources:
- listFile: ./common-source-files.txt
- ./src/shell-bash-words.txt
- ./src/shell-zsh-words.txt
format: plaintext
targetDirectory: "./dict"
generateNonStrict: false
15 changes: 15 additions & 0 deletions dictionaries/shell/cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"version": "0.2",
"files": [
"**/*.{md,txt}"
],
"dictionaries": [
"shellscript"
],
"import": [
"./cspell-ext.json"
],
"words": [
"mdash"
]
}
Loading

0 comments on commit 8d66a8f

Please sign in to comment.