Way back while studying I used tcsh as my main shell and it had this nifty feature of being able to correct a misspelled command name by pressing Escape-$ which would the. change eg “bsah” to “bash”
Now I needed it (apparently kustomize is not keyboard friendly) but could not recall ever having seen this in bash.
Can bash do this and if so how?
zsh
, with itsCORRECT
shell option set.shopt -s dirspell cdspell
, you can getbash
to correct directory names on pathname completions andcd
commands respectively, but specifically spell-checking command names does not seem to be available in it.spell-word
widget). Any particular reason to choose bash? Seems an odd choice to me especially when coming from tcsh. See also thedvorak
option in case you're using a dvorak keyboards so the spelling corrections are tuned to that keyboard layout, and thecorrect
andcorrectall
opionts for the auto-correct (like tcsh'scorrect
variable)kubectl completion ..
). As my personal Mac has long since switched to zsh I might give it a try here too.