Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there any Linux command which remembers directories I changed, and shows its stack with interacting operation to choose a directory such as pushing an arrow key on keyboard? This must be different from the way pushd/popd/dirs do.

share|improve this question

migrated from Jun 18 '10 at 1:11

This question came from our site for professional and enthusiast programmers.

CDargs has the interface you described, although getting it to work automatically from a shell would require a little hacking. You need to call

cdargs -a `pwd`

every time you switch directories, and then just running cdargs will give you a list of the directories you've bookmarked that you can move through with the arrow keys. You'd probably want a temporary file for every terminal, both so multiple terminals don't run into each other and so the list is lost when the terminal is closed, so something like this in your shell's startup script would work:

export CDARGS_FILE=`mktemp /tmp/cdargs_XXXXXXXX`
function cd() {
    pushd $*
    cdargs -f $CDARGS_FILE -a `pwd`
share|improve this answer
I read through its introduction and am dabbling in the tool. It's fun to use it. Thanks a lot! I'm getting a essential problem that ENTER key doesn't let me change a directory but I will do the rest somewhere else. – suzukimilanpaak Jun 25 '10 at 13:36
I found that the author states Cdargs need to enalbe to enter a chosen directory in some environment. It kindly works. Thanks again – suzukimilanpaak Jun 25 '10 at 14:22

It would be easy to write a function that would use dialog or whiptail along with pushdir and popdir to do what you're asking.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .