Skip to content

Instantly share code, notes, and snippets.

View mihsamusev's full-sized avatar
🏠
Working from home

Mihhail Samusev mihsamusev

🏠
Working from home
View GitHub Profile
@mihsamusev
mihsamusev / .bashrc
Created June 18, 2024 08:25
Set 2 folder paths for easy diffs
alias lsf='f() { find "$1" -maxdepth 1 -type d | nl -w 2 -s ": "; }; f'
set-before() {
root=$1
row=$2
BEFORE=$(pwd)/$(lsf "$root" | awk -v n="$row" 'NR==n {print $2}')
export BEFORE
echo "BEFORE set to $BEFORE"
}