-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bashrc
70 lines (53 loc) · 1.59 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
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
export PATH=$HOME/Scripts:$HOME/.local/bin:$PATH
[[ "$(whoami)" = "root" ]] && return
[[ -z "$FUNCNEST" ]] && export FUNCNEST=100 # limits recursive functions, see 'man bash'
## Use the up and down arrow keys for finding a command in history
## (you can write some initial letters of the command first).
bind '"\e[A":history-search-backward'
bind '"\e[B":history-search-forward'
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
if [ -f ~/.bashrc.local ]; then
. ~/.bashrc.local
fi
# Env variables
export EDITOR="nvim"
export BROWSER="zen-browser"
# Increase history size
export HISTFILESIZE=100000
export HISTSIZE=100000
export HISTTIMEFORMAT="[%F %T] "
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
# fzf bindings
eval "$(fzf --bash)"
# bash parameter completion for the dotnet CLI
_dotnet_bash_complete()
{
local word=${COMP_WORDS[COMP_CWORD]}
local completions
completions="$(dotnet complete --position "${COMP_POINT}" "${COMP_LINE}" 2>/dev/null)"
if [ $? -ne 0 ]; then
completions=""
fi
COMPREPLY=( $(compgen -W "$completions" -- "$word") )
}
complete -f -F _dotnet_bash_complete dotnet
# Starship prompt config
if [ "${BASH_VERSINFO[0]}" -gt 4 ]\
|| ([ "${BASH_VERSINFO[0]}" -eq 4 ]\
&& [ "${BASH_VERSINFO[1]}" -ge 1 ])
then
source <(starship init bash --print-full-init)
else
source /dev/stdin <<<"$(starship init bash --print-full-init)"
fi
# zoxide
eval "$(zoxide init --cmd cd bash)"