Created
March 27, 2024 18:14
-
-
Save oxagast/7cd7696825d9d07a6df0c13b714170a0 to your computer and use it in GitHub Desktop.
What was I doing again? A alias that helps you remember where you left off working.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# zsh function alias that helps you remember where you left off working in a directory. | |
# useage: leftoff /etc | |
leftoff() { e=$(pwd);cd $1; IFS=$'\n' d=($(ls -t -1 $(pwd) | head -n 5));for a in ${d}; do c=$(ls -t ${a} | head -n 1); echo "${a}/${c}"; done;cd ${e} } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment