-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bashrc
74 lines (58 loc) · 1.68 KB
/
.bashrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#!/usr/bin/env bash
# exports
export EDITOR='nvim'
export HISTCONTROL='ignoreboth'
export HISTSIZE='10000'
export HISTFILESIZE='20000'
# export PATH
export PATH=$HOME/.local/bin:$HOME/.cargo/bin:$PATH
# if not running interactively, don't do anything else
[[ $- != *i* ]] && return
# gpg
export GPG_TTY="$(tty)"
gpg-connect-agent updatestartuptty /bye >/dev/null
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
# vi mode
set -o vi
# clear shortcuts
bind -m vi-command 'Control-l: clear-screen'
bind -m vi-insert 'Control-l: clear-screen'
# shopts
shopt -s checkwinsize # line wrap on window resize
shopt -s histappend # append to history
shopt -s autocd # change to directory by name
shopt -s cdspell # autocorrect cd spelling mistakes
shopt -s dotglob # include dotted files in expansion
shopt -s nocaseglob # case-insensitive matching
shopt -s globstar # recursive globbing with **
# ignore case on completions
bind "set completion-ignore-case on"
# navigation
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias .3='cd ../../..'
alias .....='cd ../../../..'
alias .4='cd ../../../..'
# ls
alias l='exa -al --group-directories-first'
alias ls='exa --group-directories-first'
alias la='exa -a --group-directories-first'
alias ll='exa -l --group-directories-first'
alias lt='exa -aT --group-directories-first'
# ripgrep
alias grep='rg'
# dotfiles git bare
alias dotfiles="git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME"
# pyenv
if command -v pyenv &>/dev/null; then
eval "$(pyenv init -)"
fi
# direnv
eval "$(direnv hook bash)"
# mise-en-place
eval "$(mise activate bash)"
# thefuck
eval "$(thefuck --alias)"
# starship
eval "$(starship init bash)"