tweak bashrc
This commit is contained in:
26
.bashrc
26
.bashrc
@@ -12,8 +12,8 @@
|
|||||||
# wrapper for lazily loading __git_ps1 whenever it is actually needed
|
# wrapper for lazily loading __git_ps1 whenever it is actually needed
|
||||||
_lazy_git_ps1() {
|
_lazy_git_ps1() {
|
||||||
if [[ -z $__GIT_PROMPT_SOURCED ]]; then
|
if [[ -z $__GIT_PROMPT_SOURCED ]]; then
|
||||||
source /usr/share/bash-completion/completions/git &>/dev/null
|
. /usr/share/bash-completion/completions/git &>/dev/null
|
||||||
source /usr/share/git/completion/git-prompt.sh &>/dev/null
|
. /usr/share/git/completion/git-prompt.sh &>/dev/null
|
||||||
if [ -d .git ] || git worktree list &>/dev/null; then
|
if [ -d .git ] || git worktree list &>/dev/null; then
|
||||||
export __GIT_PROMPT_SOURCED=1
|
export __GIT_PROMPT_SOURCED=1
|
||||||
__git_ps1 "$@"
|
__git_ps1 "$@"
|
||||||
@@ -42,6 +42,9 @@ _make() {
|
|||||||
-e "s/^.*error.*$/\x1b[31m&\x1b[0m/I" >&2)
|
-e "s/^.*error.*$/\x1b[31m&\x1b[0m/I" >&2)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# envs
|
||||||
|
#
|
||||||
# set PS1
|
# set PS1
|
||||||
PS1=
|
PS1=
|
||||||
PS1="$PS1"'\[\033[01;35m\]\u@\h' # user@host
|
PS1="$PS1"'\[\033[01;35m\]\u@\h' # user@host
|
||||||
@@ -51,12 +54,14 @@ PS1="$PS1"'\[\033[01;93m\]$(_lazy_git_ps1)' # github branch
|
|||||||
PS1="$PS1"'\[\033[00m\]\$ ' # shell sign
|
PS1="$PS1"'\[\033[00m\]\$ ' # shell sign
|
||||||
|
|
||||||
# history settings
|
# history settings
|
||||||
HISTCONTROL=ignoreboth # don't put duplicate lines or lines starting with space in the history.
|
HISTSIZE=2048
|
||||||
HISTSIZE=1000
|
HISTFILESIZE=2048
|
||||||
HISTFILESIZE=2000
|
HISTCONTROL=erasedups:ignoredups:ignorespace
|
||||||
|
|
||||||
# vcpkg shit
|
#
|
||||||
source /home/user/.local/share/vcpkg/scripts/vcpkg_completion.bash &>/dev/null
|
# bash completion
|
||||||
|
#
|
||||||
|
. /home/user/.local/share/vcpkg/scripts/vcpkg_completion.bash &>/dev/null # fucking vcpkg
|
||||||
|
|
||||||
# check the window size after each command (and if necessary, the values of LINES and COLUMNS)
|
# check the window size after each command (and if necessary, the values of LINES and COLUMNS)
|
||||||
shopt -s checkwinsize
|
shopt -s checkwinsize
|
||||||
@@ -91,5 +96,12 @@ alias q='exit'
|
|||||||
alias py3='python3'
|
alias py3='python3'
|
||||||
alias batman='bat -l man'
|
alias batman='bat -l man'
|
||||||
|
|
||||||
|
# quality of life short-hands
|
||||||
|
alias ..='cd ..'
|
||||||
|
alias ....='cd ../..'
|
||||||
|
alias ......='cd ../../..'
|
||||||
|
alias ........='cd ../../../..'
|
||||||
|
alias ll="ls -l"
|
||||||
|
|
||||||
# cute lil hyfetch :3
|
# cute lil hyfetch :3
|
||||||
[[ $TERM == "xterm-kitty" ]] && hyfetch
|
[[ $TERM == "xterm-kitty" ]] && hyfetch
|
||||||
|
|||||||
Reference in New Issue
Block a user