Some years ago (on November 10th, 2006) I wrote one of my favourite console hacks. At that time I was digging in Bash and discovered the PROMPT_COMMAND variable. It defines a command line that will be run before the prompt is showed. I thought this might be useful to see the files in a directory when enters in it, so the cd → ls sequence will not be so repeated. There are some constraints: After some minutes I had coded a dirty C program which makes everything, with a little Bash support. Something like this:
Post de prueba