Is there a way that I could reference the same path from one command to the next? For example, I may want to list the contents of a specific folder:
$ ls ~/Documents/some/dir
Then, once I've done that, I may want to perform some action in that same directory:
$ mv ~/Documents/some/dir/file.txt ~/Documents/other/dir
Is there a way to, essentially, invoke that path without typing it again (or using some sort of auto-suggestion or auto-fill that I can do with .zsh)?
I vaguely remember reading about something along these lines but I don't remember what the technique is?