Clean bashrc
parent
1eb975686a
commit
2082bc2ea7
16
.bashrc
16
.bashrc
|
@ -10,22 +10,15 @@ export PATH=~/.bin:$PATH
|
||||||
# Prompt
|
# Prompt
|
||||||
bold=$(tput bold)
|
bold=$(tput bold)
|
||||||
reset=$(tput sgr0)
|
reset=$(tput sgr0)
|
||||||
|
|
||||||
get_tasks_left() {
|
|
||||||
echo "$(todoist l | wc -l) tasks"
|
|
||||||
}
|
|
||||||
|
|
||||||
get_branch_name() {
|
get_branch_name() {
|
||||||
git symbolic-ref --quiet --short HEAD 2>/dev/null \
|
git symbolic-ref --quiet --short HEAD 2>/dev/null \
|
||||||
|| git rev-parse --short HEAD 2>/dev/null \
|
|| git rev-parse --short HEAD 2>/dev/null \
|
||||||
|| echo 'some branch'
|
|| echo 'some branch'
|
||||||
}
|
}
|
||||||
|
|
||||||
get_git_info() {
|
get_git_info() {
|
||||||
git rev-parse --is-inside-work-tree &>/dev/null || return
|
git rev-parse --is-inside-work-tree &>/dev/null || return
|
||||||
echo -e " ${1}$(get_branch_name)"
|
echo -e " ${1}$(get_branch_name)"
|
||||||
}
|
}
|
||||||
|
|
||||||
PS1='\[\033[38;5;244m\]\[${bold}\]$(get_git_info && echo "\n")\[${reset}\]\u \W ❭ '
|
PS1='\[\033[38;5;244m\]\[${bold}\]$(get_git_info && echo "\n")\[${reset}\]\u \W ❭ '
|
||||||
|
|
||||||
# History
|
# History
|
||||||
|
@ -33,8 +26,10 @@ export HISTCONTROL=ignoreboth
|
||||||
export HISTSIZE=500000
|
export HISTSIZE=500000
|
||||||
|
|
||||||
# Readable man pages
|
# Readable man pages
|
||||||
MANWIDTH=120
|
export MANWIDTH=120
|
||||||
export MANWIDTH
|
|
||||||
|
# Vim
|
||||||
|
export EDITOR='vim'
|
||||||
|
|
||||||
# Fuzzy finder setup
|
# Fuzzy finder setup
|
||||||
source /usr/share/fzf/*.bash
|
source /usr/share/fzf/*.bash
|
||||||
|
@ -43,9 +38,6 @@ export FZF_DEFAULT_COMMAND='ag --hidden --ignore .git -t -g ""'
|
||||||
export FZF_DEFAULT_OPTS='--height 38% --reverse --border --prompt="❭ " --pointer="❭"'
|
export FZF_DEFAULT_OPTS='--height 38% --reverse --border --prompt="❭ " --pointer="❭"'
|
||||||
export FZF_COMPLETION_OPTS='-x'
|
export FZF_COMPLETION_OPTS='-x'
|
||||||
|
|
||||||
# Vim
|
|
||||||
export EDITOR='vim'
|
|
||||||
|
|
||||||
# Nvm
|
# Nvm
|
||||||
lazy_load_nvm() {
|
lazy_load_nvm() {
|
||||||
unset -f nvm node npm npx
|
unset -f nvm node npm npx
|
||||||
|
|
Loading…
Reference in New Issue