Maybe there is a tool that does that? Maybe I'm doing this all wrong and there is a different way I should browse?

you are viewing a single comment's thread
view the rest of the comments
[–] 24 points 1 day ago

You may want to learn about the shell's "history expantion" functions. as an example:

~$ ls ~/Documents/taxes/tax_year_2012/2012-12-01.txt  
/home/tom/Documents/taxes/tax_year_2012/2012-12-01.txt  

~$ cd !!$:h  
cd ~/Documents/taxes/tax_year_2012  

~/Documents/tax_2012$ pwd  
/home/tom/Documents/taxes/tax_year_2012  

Here the string "!!$:h" is basically the last command's [ !! ] last argument [$], stripped of its last path component [:h].

  • source