From 6a0f8a083471fb60c3b2b8e95ad0877216424804 Mon Sep 17 00:00:00 2001 From: Quinn Date: Fri, 20 Jun 2025 17:31:53 +0200 Subject: [PATCH] tweak bashrc --- .bashrc | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/.bashrc b/.bashrc index eb71ba4..5651b90 100644 --- a/.bashrc +++ b/.bashrc @@ -12,8 +12,8 @@ # wrapper for lazily loading __git_ps1 whenever it is actually needed _lazy_git_ps1() { if [[ -z $__GIT_PROMPT_SOURCED ]]; then - source /usr/share/bash-completion/completions/git &>/dev/null - source /usr/share/git/completion/git-prompt.sh &>/dev/null + . /usr/share/bash-completion/completions/git &>/dev/null + . /usr/share/git/completion/git-prompt.sh &>/dev/null if [ -d .git ] || git worktree list &>/dev/null; then export __GIT_PROMPT_SOURCED=1 __git_ps1 "$@" @@ -42,6 +42,9 @@ _make() { -e "s/^.*error.*$/\x1b[31m&\x1b[0m/I" >&2) } +# +# envs +# # set PS1 PS1= 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 # history settings -HISTCONTROL=ignoreboth # don't put duplicate lines or lines starting with space in the history. -HISTSIZE=1000 -HISTFILESIZE=2000 +HISTSIZE=2048 +HISTFILESIZE=2048 +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) shopt -s checkwinsize @@ -91,5 +96,12 @@ alias q='exit' alias py3='python3' 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 [[ $TERM == "xterm-kitty" ]] && hyfetch