ls-Improved (lsi) is a command-line tool for listing directory structures along with their descriptions. It is particularly useful for managing and accessing experimental results, which can often be buried deep within multiple directories.
Consider a directory structure filled with experimental results. Finding the best result can be cumbersome, often requiring you to open multiple directories or maintain a separate summary file.
With ls-Improved (lsi), you can view the list of directories along with their descriptions in a single command:
Follow these steps to download the latest version of the binary file, extract it, and set up the PATH:
unzip <downloaded-file.zip>
/usr/local/bin
).~/.bashrc
or ~/.zshrc
file:
export PATH=$PATH:/usr/local/bin
source ~/.bashrc # or source ~/.zshrc
Below are the usage details:
lsi [PATH]
: Show the directory structure and descriptions of the specified PATH
(default is "./"
).lsi -a, --all
: Include entries that start with .
(hidden files and directories).lsi -f, --only-files
: Show only files, not directories.lsi -d, --only-dirs
: Show only directories, not files.lsi -c, --config-path <ConfigPath>
: Load configuration from the specified ConfigPath
.lsi -n, --line-num <Number>
: Limit the description lines to the specified Number
.lsi -S, --sort-mode <Mode>
: Sort by path (p
) or description (d
).lsi -s, --set-description <Description> [PATH]
: Write the specified Description
to the .description.lsi
file in the specified PATH
.lsi -e, --edit-description <Editor> [PATH]
: Open the description .description.lsi
file in the specified Editor
(default is vim
).Example command to set a description:
lsi -s "This is a brief description" ./experiments/run1
Example command to edit a description using nano:
lsi -e nano ./experiments/run1
It is beneficial to add the following aliases to your .bashrc
or .zshrc
for quicker navigation and usage:
alias clear='clear && lsi ./'
function cdlsi () {
cd "$@" && lsi ./
}
alias cd='cdlsi'
Feel free to explore, contribute, and open issues if you encounter any. Happy organizing!