1

Is there a linux tool that upon for example when I run:

ls -lrt

will not only print the result but will also print

ls - list files
-l - show extended list
-r - reverse
-t - sort by time
AND ONLY NOW PRINT THE RESULTS

the reason is that it would be cool if it could always remind me what the options that i'm using are actually are! :)

Is there anything like this to print dynamically the help for the options I'm currently using?

1 Answer 1

0

You would need a "pre-execution" function of some sorts, then have it pick out the actual options used at an instance of a call and translate that into e.g.

$ man ls | grep -E  '^[ \t]+(-l|-r|-t)'
       -l     use a long listing format
       -r, --reverse
       -t     sort by modification time, newest first

... for an ls -lrt.

You must log in to answer this question.

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