mirror of
https://github.com/kremalicious/dotfiles.git
synced 2024-11-21 17:27:13 +01:00
more bash defaults, switch cyan
This commit is contained in:
parent
62f896a738
commit
0c349b0bb7
45
bash_profile
45
bash_profile
@ -26,21 +26,38 @@ unset file;
|
||||
# Append to the Bash history file, rather than overwriting it
|
||||
shopt -s histappend
|
||||
|
||||
# Save multi-line commands as one command
|
||||
shopt -s cmdhist
|
||||
|
||||
# Avoid duplicate entries
|
||||
HISTCONTROL="erasedups:ignoreboth"
|
||||
|
||||
# Don't record some commands
|
||||
export HISTIGNORE="&:[ ]*:exit:ls:bg:fg:history:clear"
|
||||
|
||||
# fuck that you have new mail shit
|
||||
unset MAILCHECK
|
||||
|
||||
# Case-insensitive globbing (used in pathname expansion)
|
||||
shopt -s nocaseglob
|
||||
|
||||
# Autocorrect typos in path names when using `cd`
|
||||
shopt -s cdspell
|
||||
# Turn on recursive globbing (enables ** to recurse all directories)
|
||||
shopt -s globstar 2> /dev/null
|
||||
|
||||
# Enable some Bash 4 features when possible:
|
||||
# * `autocd`, e.g. `**/qux` will enter `./foo/bar/baz/qux`
|
||||
# * Recursive globbing, e.g. `echo **/*.txt`
|
||||
for option in autocd globstar; do
|
||||
shopt -s "$option" 2> /dev/null;
|
||||
done;
|
||||
# Prepend cd to directory names automatically
|
||||
shopt -s autocd 2> /dev/null
|
||||
|
||||
# Correct spelling errors during tab-completion
|
||||
shopt -s dirspell 2> /dev/null
|
||||
|
||||
# Correct spelling errors in arguments supplied to cd
|
||||
shopt -s cdspell 2> /dev/null
|
||||
|
||||
# Update window size after every command
|
||||
shopt -s checkwinsize
|
||||
|
||||
# Automatically trim long paths in the prompt (requires Bash 4.x)
|
||||
PROMPT_DIRTRIM=4
|
||||
|
||||
# Add tab completion for many Bash commands
|
||||
if which brew &> /dev/null && [ -f "$(brew --prefix)/share/bash-completion/bash_completion" ]; then
|
||||
@ -49,6 +66,18 @@ elif [ -f /etc/bash_completion ]; then
|
||||
source /etc/bash_completion;
|
||||
fi;
|
||||
|
||||
# Perform file completion in a case insensitive fashion
|
||||
bind "set completion-ignore-case on"
|
||||
|
||||
# Treat hyphens and underscores as equivalent
|
||||
bind "set completion-map-case on"
|
||||
|
||||
# Display matches for ambiguous patterns at first tab press
|
||||
bind "set show-all-if-ambiguous on"
|
||||
|
||||
# Immediately add a trailing slash when autocompleting symlinks to directories
|
||||
bind "set mark-symlinked-directories on"
|
||||
|
||||
# Add tab completion for SSH hostnames based on ~/.ssh/config, ignoring wildcards
|
||||
[ -e "$HOME/.ssh/config" ] && complete -o "default" -o "nospace" -W "$(grep "^Host" ~/.ssh/config | grep -v "[?*]" | cut -d " " -f2- | tr ' ' '\n')" scp sftp ssh;
|
||||
|
||||
|
@ -72,7 +72,7 @@ if tput setaf 1 &> /dev/null; then
|
||||
gray=$(tput setaf 242);
|
||||
blue=$(tput setaf 109);
|
||||
green=$(tput setaf 143);
|
||||
cyan=$(tput setaf 110);
|
||||
cyan=$(tput setaf 43);
|
||||
orange=$(tput setaf 173);
|
||||
purple=$(tput setaf 125);
|
||||
red=$(tput setaf 167);
|
||||
|
Loading…
Reference in New Issue
Block a user