The first two options (autocd and cdspell) have been a lifesaver in fixing my frustrations with the default bash settings (and even lets me stick with bash, instead of feeling I should move to zsh or any other shell.
I can just type a foldername, tabcomplete it and press enter to go there. It’s great.
# == shopts ==# https://www.gnu.org/software/bash/manual/html_node/The-Shopt-Builtin.htmlshopt -s autocd # cd into folder without cd, so 'dotfiles' will cd into the foldershopt -s cdspell # attempt spelling correcting on foldersshopt -s direxpand # expand a partial dir nameshopt -s checkjobs # stop shell from exit when there's jobs runningshopt -s dirspell # attempt spelling correcting on foldersshopt -s expand_aliases # aliases are expandedshopt -s histappend # append to the history file, don't overwrite itshopt -s histreedit # lets your re-edit old executed commandshopt -s histverify # I'm confused.shopt -s hostcomplete # performs completion when a word contains an '@'shopt -s cmdhist # save multiple-line command in single history entryshopt -u lithist # multi-lines are saved with embedded newlines rather than semicolons; explictly unsetshopt -s checkwinsize # update LINES and COLUMNS to fit output
alias ..='cd ..' #: up one directory alias ...='cd ../..' #: up two directories
The first two options (
autocd
andcdspell
) have been a lifesaver in fixing my frustrations with the defaultbash
settings (and even lets me stick with bash, instead of feeling I should move to zsh or any other shell.I can just type a foldername, tabcomplete it and press enter to go there. It’s great.
# == shopts == # https://www.gnu.org/software/bash/manual/html_node/The-Shopt-Builtin.html shopt -s autocd # cd into folder without cd, so 'dotfiles' will cd into the folder shopt -s cdspell # attempt spelling correcting on folders shopt -s direxpand # expand a partial dir name shopt -s checkjobs # stop shell from exit when there's jobs running shopt -s dirspell # attempt spelling correcting on folders shopt -s expand_aliases # aliases are expanded shopt -s histappend # append to the history file, don't overwrite it shopt -s histreedit # lets your re-edit old executed command shopt -s histverify # I'm confused. shopt -s hostcomplete # performs completion when a word contains an '@' shopt -s cmdhist # save multiple-line command in single history entry shopt -u lithist # multi-lines are saved with embedded newlines rather than semicolons; explictly unset shopt -s checkwinsize # update LINES and COLUMNS to fit output