-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.bashrc
More file actions
39 lines (28 loc) · 1.5 KB
/
.bashrc
File metadata and controls
39 lines (28 loc) · 1.5 KB
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
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
PATH="$HOME/.local/bin":$HOME/bin:$PATH
export PATH
# User specific aliases and functions
PS1='\[\e[1;32m\][\u@\h \W]\$\[\e[0m\] '
urldecode(){ local d=${1//+/ }; printf '%b' "${d//%/\x}"; }
if [ -f "$HOME/.bash-git-prompt/gitprompt.sh" ]; then
GIT_PROMPT_ONLY_IN_REPO=1
source $HOME/.bash-git-prompt/gitprompt.sh
fi
export EDITOR=vim
export PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND"
[ -f ~/.fzf.bash ] && source ~/.fzf.bash
_fzf_comprun() {
local command=$1
shift
case "$command" in
cd) fzf "$@" --preview 'tree -C {} | head -200' ;;
*) fzf "$@" ;;
esac
}
eval $(thefuck --alias)
# display a random man page when a shell starts
text=$(man $(ls /usr/bin | shuf -n 1)| sed -n "/^NAME/ {n;p;q}" | tr -s ' ') && echo $text