-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbashrc
74 lines (63 loc) · 2.01 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
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
HISTCONTROL=ignoreboth
shopt -s histappend
HISTSIZE=1000
HISTFILESIZE=2000
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if ! shopt -oq posix; then
if [ -f /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion
elif [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
fi
if [ -f "$HOME/.bash-git-prompt/gitprompt.sh" ]; then
GIT_PROMPT_ONLY_IN_REPO=1
GIT_PROMPT_THEME=Single_line
source $HOME/.bash-git-prompt/gitprompt.sh
fi
[ -z "$TMUX" ] && export TERM=xterm-256color
[ -f ~/.fzf.bash ] && source ~/.fzf.bash
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
source $HOME/.asdf/completions/asdf.bash
source ~/.profile
function gclone () {
read -p "Repo owner: " owner
read -p "Repo name: " name
read -p "Organization: " org
read -p "Directory [~/code/${org}/${name}]: " directory
mkdir -p ~/code/${org}
clone_git_repo $owner $name ~/code/${org}/${directory:-$name}
}
function confirm_delete() {
read -r -p "Are you sure you want to delete $1? [y/N] " response
response=${response,,} # tolower
echo
if [[ "$response" =~ ^(yes|y)$ ]]
then
true
else
false
fi
}
if [[ $- =~ i ]]; then
bind '"\er": redraw-current-line'
bind '"\C-g\C-f": "$(_gf)\e\C-e\er"'
bind '"\C-g\C-b": "$(_gb)\e\C-e\er"'
bind '"\C-g\C-t": "$(_gt)\e\C-e\er"'
bind '"\C-g\C-h": "$(_gh)\e\C-e\er"'
bind '"\C-g\C-r": "$(_gr)\e\C-e\er"'
bind '"\C-g\C-p": "$(_gp)\e\C-e\er"'
fi