-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bashrc
61 lines (47 loc) · 1.2 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
#!/bin/bash
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
### ENV
# SSH Agent
export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/gcr/ssh"
# EDITOR
export EDITOR=nvim
export VISUAL=nvim
export PATH="/usr/lib/ccache/bin/:$PATH"
### ALIASES
# hosts
alias hosts='sudo nvim /etc/hosts'
# python
alias py='python'
# basic shell
alias ls='exa'
alias ll='exa -lah'
alias cat='bat -pP'
alias vim='nvim'
# host
alias a='host -ta'
alias mx='host -tmx'
alias ns='host -tns'
alias txt='host -ttxt'
alias vw='vim ~/git/website/content/'
dhost() {
host "$(host -t a "$1" | awk '{print $NF}')"
}
### SETTINGS
# prompt
PS1='\[\e[1m\][\[\e[0;92m\]\H\[\e[0;1m\]]\[\e[0m\]:$PWD \[\e[90;2m\]$(git branch 2>/dev/null | grep '"'"'*'"'"' | colrm 1 2)\n\[\e[0m\]\$ '
# autocd
shopt -s autocd
# history
HISTTIMEFORMAT="%d/%m/%Y %H:%M - "
HISTSIZE=10000
HISTFILESIZE=10000
HISTCONTROL=ignoredups
shopt -s histappend
shopt -s cmdhist
source ~/.ssh/aliases.sh
alias config='/usr/bin/git --git-dir=/home/kuba/git/dotfiles --work-tree=/home/kuba'
alias cs='config status'
alias ca='config add'
alias cm='config commit -m'
# bind -x '"\C-r": eval "$(grep -v "^#" ~/.bash_history* | grep -v "^#"| fzf --tac | cut -d ":" -f2-)"'