From 7f3bbba059828a8cb7962177ed737f4db2eb7209 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Mon, 20 Jun 2022 10:27:25 +0200 Subject: ... --- accounts/gkleen@sif/zshrc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'accounts') diff --git a/accounts/gkleen@sif/zshrc b/accounts/gkleen@sif/zshrc index 712ec690..2d71f5a3 100644 --- a/accounts/gkleen@sif/zshrc +++ b/accounts/gkleen@sif/zshrc @@ -416,6 +416,12 @@ dichotomic_search() { echo $min } +while read -r -d $'\0' d _ s; do + hash -d ${s}=${d} +done < <(find ~/projects ~/uni -regextype posix-extended -maxdepth 2 -type d -regex '\S+/[0-9]{2}[ws]/\S+' -print0 2>/dev/null | \ + sed -zr 's|(.*/([0-9]{2}[ws])/(.+))|\1 \2 \3|' | \ + sort -z -r -k2 | sort -z -s -k3 | uniq -z -f 2) + alias '..'='cd ..' alias -g L='| less' alias -g S='&> /dev/null' -- cgit v1.2.3