I'm looking for a package the browser's "back" button for dired. i.e. some way to go back to a previously visited directory.
The usecase I have in mind is to traverse deeper into a directory tree after invoking ^ to to to a parent folder.
Use q
to just close the current window, and the last visited one will be here.
I use a
to drill down into directories, then rebind ^
to this to go back up:
(defun my-dired-up-dir ()
"Go up a directory."
(interactive)
(let ((current-dir (dired-current-directory)))
(find-alternate-file "..")
(dired-goto-file current-dir)))
It goes up a directory and puts point on the directory you just came from (so you can a
back down if you want). Perhaps not exactly what you want since it only works on one level, but might still be useful.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With