The Reach Recent Command for Unix
re command aims to make
cd operations more efficient
when targeting recently used folders in a deep hierarchy.
There are two essential features:
relist (in-depth) subdirectories by order of last modification,
re foorestricts the output to directories whose name includes
One can then type in a digit to select the desired directory to
Or simply type
enter to validate the first choice.
In case there is a single result, it is automatically selected.
The efficient way to integrate the
re.sh script in one's shell is by adding
the following alias into
alias re='. ~/re.sh 8'
Where the parameter
8 bounds the number of result to display.
. re.sh nb_results [folder_name_pattern]
nb_resultsis the maximal number of folders to display,
folder_name_patternrestricts the recent folders to those that contain the pattern in their name (i.e., syntactic substring).
- limitations when filtering folders whose name includes spaces, - hidden folders are excluded, it might be useful to provide an option to include them, - it might be useful to include an option to exclude folder on remote servers from the search.