The autols program helps to browser the filesystem. Each time you enter into a directory the program will execute a ls on it. You can limit the number of files (to avoid a flooding when enter in a big directory), change the arguments to the ls and even use a different program.
Download the source code from git://github.com/ayosec/autols.git and run make
$ git clone https://github.com/ayosec/autols.git $ cd autols $ make $ sudo make install
When the autols command can be found via $PATH you have to load the configuration for your shell. In the /shell/ directory in the repository you can find the snippets the load autols in Bash and Zsh.
For Bash:
$ echo source $PWD/shell/bashrc >> ~/.bashrc
For Zsh:
$ echo source $PWD/shell/zsh >> ~/.zshrc
Now, reload your shell (or open a new one) and you will see a ls after every cd, pushd, popd or any other method that you use to change the current directory.
The program recognizes three options. None of these options are required. You should be able to use autols with the default values with no problems.
-l number-
If the number of non-hidden files in the directory is greater than the
-llimit, thelswill not be executed. Instead, a one-line summary will be printed. Defaults to 40. -m number-
The header includes the directory name. If the name length is greater than the
-mlimit it will replace the middle with an ellipsis. Defaults to 60, and the min value is 10. -c string-
The command to execute when the
-llimit is not exceeded. Defaults tols --color=always -F
You can modify the arguments used to execute the autols with the env variable AUTOLS_OPTIONS. For example
$ cat >> ~/.bashrc <<END AUTOLS_OPTIONS="-c 'ls -lF' -l 100" END
Note for MacOS users: It seems that MacOS does not use the GNU ls, and its ls has no --color option. You should set AUTOLS_OPTIONS to remove --color. Try with AUTOLS_OPTIONS="-c 'ls -GF'". You can see the options in the manpage.