diff --git a/dot_scripts/npmdeps.sh b/dot_scripts/npmdeps.sh index 40bf5fd..da66ad4 100755 --- a/dot_scripts/npmdeps.sh +++ b/dot_scripts/npmdeps.sh @@ -9,5 +9,7 @@ echo "Install wiki CLI tool" npm install -g wikit echo "Install Write-good CLI spell checker" npm install -g write-good +echo "Install Alex a text linter" +npm install -g alex cd "$HOME" || exit diff --git a/dot_scripts/suggest_readable_parameters.sh b/dot_scripts/suggest_readable_parameters.sh index 8097a40..e384dd1 100755 --- a/dot_scripts/suggest_readable_parameters.sh +++ b/dot_scripts/suggest_readable_parameters.sh @@ -11,8 +11,9 @@ function suggest_readable_parameters() { # TODO : bring support for shell functions aliased to anything providing a real manual # e.g : checkov should be taken into account but github should not # TODO : bring support for backslashed functions (e.g : \egrep) + # FIXME : alex --quiet is not detected # TODO : support research of command usage when parameters of command appear after command arguments, like : path_swilgt=$(find /usr/local/Cellar/logtalk -name "*swilgt.sh"dev/null) - # TODO : support sub commands like in git ls-tree where ls-tree is a subcommand with its own manual : git ls-tree -r --long + # TODO : support sub commands like in git ls-tree where ls-tree is a subcommand with its own manual : git ls-tree -r --long; or npm install -g where -g is a valid option for npm install if [[ $(LC_ALL=C type "$command_name") != *"alias for"* && $(LC_ALL=C type "$command_name") != *"is a shell function"* ]] && [[ $($command_name --help &>/dev/null) -eq 0 || $(info $command_name &>/dev/null) -eq 0 ]]; then while read -r command_usage; do diff --git a/dot_vimrc b/dot_vimrc index e976a88..eb1b42f 100644 --- a/dot_vimrc +++ b/dot_vimrc @@ -116,7 +116,7 @@ let g:ale_fixers = { \ 'zsh' : ['shfmt'], \} -let g:ale_linters = {'zsh': ['shellcheck'], 'text': ['writegood', 'proselint']} +let g:ale_linters = {'zsh': ['shellcheck'], 'text': ['writegood', 'proselint', 'alex']} " when running at every change you may want to disable quickfix let g:prettier#quickfix_enabled = 1 diff --git a/dot_zsh_functions b/dot_zsh_functions index 931ddc8..1c07c8d 100644 --- a/dot_zsh_functions +++ b/dot_zsh_functions @@ -281,12 +281,13 @@ function invalid_file_refs() { # run write-good, proselint, and aspell in non interactive mode, to list all mispelled words found function checkenlist() { aspell -d en list < "$1" | sort --unique --ignore-case - write-good "$1" | sort --unique --ignore-case - proselint "$1" | sort --unique --ignore-case + write-good "$1" + proselint "$1" + alex -q --stdin < "$1" } function checkenremote() { - curl --location --insecure --silent "$1" > /tmp/file && checkenlist /tmp/file && write-good /tmp/file && proselint /tmp/file + curl --location --insecure --silent "$1" > /tmp/file && checkenlist /tmp/file && write-good /tmp/file && proselint /tmp/file && \cat /tmp/file > alex -q --stdin } # Time management