all repos — dotfiles @ f9c9735ee6e2e199e5c35a6e70027bd438164aa8

my *nix dotfiles

bash/.bashrc (view raw)

 1# better history syncing
 2shopt -s histappend
 3export HISTCONTROL=ignoreboth:erasedups
 4HISTSIZE=40000
 5HISTFILESIZE=40000
 6
 7# cool options for cool kids
 8shopt -s \
 9    autocd \
10    globstar \
11    checkwinsize \
12    cdspell \
13    dirspell \
14    expand_aliases \
15    dotglob \
16    gnu_errfmt \
17    histreedit \
18    nocasematch 
19
20bind 'set completion-ignore-case on'
21bind 'set show-all-if-ambiguous on'
22bind 'set colored-stats on'
23bind 'set completion-display-width 1'
24bind 'TAB:menu-complete'
25
26# fzy reverse search
27__fzy_history() {
28    ch="$(fc -l 1000 | fzy | cut -f2)"
29    : "${ch#"${ch%%[![:space:]]*}"}"
30    printf "$_"
31}
32
33bind -x '"\C-r": READLINE_LINE=$(__fzy_history); READLINE_POINT="${#READLINE_LINE}"'
34
35complete -cf doas
36
37# z
38. /usr/local/etc/profile.d/z.sh
39
40for i in ~/.bashrc.d/[0-9]*; do
41    . "$i"
42done
43
44export NVM_DIR="$HOME/.nvm"
45[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
46[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion
47
48# The next line updates PATH for the Google Cloud SDK.
49if [ -f '/Users/icy/Downloads/google-cloud-sdk/path.bash.inc' ]; then . '/Users/icy/Downloads/google-cloud-sdk/path.bash.inc'; fi
50
51# The next line enables shell command completion for gcloud.
52if [ -f '/Users/icy/Downloads/google-cloud-sdk/completion.bash.inc' ]; then . '/Users/icy/Downloads/google-cloud-sdk/completion.bash.inc'; fi