From 76dc1a55f50fbe3b966641110e810c8efc805eb0 Mon Sep 17 00:00:00 2001 From: Sam Nystrom Date: Sun, 4 Feb 2024 10:29:26 -0500 Subject: Switch from yash to busybox ash --- .yashrc | 84 ----------------------------------------------------------------- 1 file changed, 84 deletions(-) delete mode 100644 .yashrc (limited to '.yashrc') diff --git a/.yashrc b/.yashrc deleted file mode 100644 index 3f4fe05..0000000 --- a/.yashrc +++ /dev/null @@ -1,84 +0,0 @@ -_ps1_prompt() { - cmd_status=$? - cmd_duration=$((CMD_DURATION / 1000)) - CMD_DURATION=0 - is_git=$(git rev-parse --is-inside-work-tree 2>/dev/null) - - prompt="\n\\foc." - if [ "$is_git" ]; then - prompt="$prompt$(git rev-parse --show-toplevel | awk -F/ '{ print $NF }')" - git_path=$(git rev-parse --show-prefix) - git_path="${git_path%/}" - prompt="$prompt${git_path:+"/$git_path"}" - elif [ "${PWD#"$HOME"}" != "$PWD" ]; then - prompt="$prompt~${PWD#"$HOME"}" - else - prompt="$prompt$PWD" - fi - prompt="$prompt\\fD." - - if [ "$is_git" ]; then - prompt="$prompt on \\fom. $(git branch --show-current)" - - stat= - git rev-parse --verify refs/stash >/dev/null 2>&1 && stat="$stat\$" - status="$(git status --porcelain -b)" - case "$status" in - U[UDA]*|AA*|DD*|[DA]U*) stat="$stat=" ;; - esac - case "$status" in - [MARCDU\ ]D*|D[\ UM]*) stat="$stat✘" ;; - esac - case "$status" in - R[\ MD]*) stat="$stat»" ;; - esac - case "$status" in - [\ MARC]M*) stat="$stat!" ;; - esac - case "$status" in - A[\ MDAU]*|M[\ MD]*|UA*) stat="$stat+" ;; - esac - case "$status" in - '??'*) stat="$stat?" ;; - esac - case "$status" in - '## '*ahead*behind*) stat="$stat⇕" ;; - '## '*ahead*) stat="$stat⇡" ;; - '## '*behind*) stat="$stat⇣" ;; - esac - prompt="$prompt${stat:+"\\for. [$stat]"}" - fi - - if [ "$cmd_duration" -gt 1 ]; then - prompt="$prompt took\\foy." - - secs=$((cmd_duration % 60)) - mins=$((cmd_duration / 60 % 60)) - hours=$((cmd_duration / 3600)) - - [ "$hours" -gt 0 ] && prompt="$prompt ${hours}h" - [ "$mins" -gt 0 ] && prompt="$prompt ${mins}m" - [ "$secs" -gt 0 ] && prompt="$prompt ${secs}s" - fi - prompt="$prompt\n" - - n_jobs="$(jobs 2>/dev/null | wc -l)" - if [ "$n_jobs" -gt 0 ]; then - [ "$n_jobs" -le 1 ] && n_jobs= - prompt="$prompt\\fob.✦ ${n_jobs:+"$n_jobs "}" - fi - case "$cmd_status" in - 0) printf '%s\\fg.❯ \\fD.' "$prompt" ;; - *) printf '%s\\fr.❯ \\fD.' "$prompt" ;; - esac -} - -export PS1='$(_ps1_prompt)' - -export HISTSIZE=100000 -export HISTRMDUP=10 - -set le-predict - -alias cfg='git --git-dir ~/.cfg --work-tree ~' -alias tree='tree -C' -- cgit v1.2.3