From 768a4b0aec0403f339d43de3485e3c5fed7685a9 Mon Sep 17 00:00:00 2001 From: tiyn Date: Fri, 20 Oct 2023 00:15:47 +0200 Subject: [PATCH] alias: added prev and next cd --- .config/aliasrc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.config/aliasrc b/.config/aliasrc index af15733..3a17b32 100644 --- a/.config/aliasrc +++ b/.config/aliasrc @@ -11,6 +11,8 @@ alias "...."="cd ../../.." alias "....."="cd ../../../.." alias "......"="cd ../../../../.." alias "dockervol"="cd /var/lib/docker/volumes" +alias prev='cd ../"$(ls -F .. | grep '/' | grep -B1 -xF "${PWD##*/}/" | head -n 1)"' +alias next='cd ../"$(ls -F .. | grep '/' | grep -A1 -xF "${PWD##*/}/" | tail -n 1)"' # cp alias cp="cp -i"