Skip to content

About

🎨ls-Improved is an advanced Linux command tool that, beyond 'ls', enables recording and displaying descriptive notes for each file and directory, simplifying identification, recall, and shared repository comprehension.

Resources

Stars

12 stars

Watchers

1 watching

Forks

Latest commit

 

History

323 Commits

Folders and files

Repository files navigation

ls-Improved: Descriptive ls-like Command

ls

日本語 README

What is it?

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.

Example

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.

ls

With ls-Improved (lsi), you can view the list of directories along with their descriptions in a single command:

lsi

Install

Follow these steps to download the latest version of the binary file, extract it, and set up the PATH:

  1. Visit the GitHub releases page.
  2. Find the latest version release and download the corresponding binary file in zip format.
  3. Extract the downloaded zip file. You can use the following command to unzip:
    unzip <downloaded-file.zip>
  4. Place the extracted binary file in an appropriate directory (e.g., /usr/local/bin).
  5. Add the directory to your environment variables. Typically, you can do this by adding the following line to your ~/.bashrc or ~/.zshrc file:
    export PATH=$PATH:/usr/local/bin
  6. To apply the changes, restart your terminal or run the following command:
    source ~/.bashrc  # or source ~/.zshrc

Usage

Below are the usage details:

Basic Commands

  • 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).

Managing Descriptions

  • 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

Configuration Tips

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'

Related Projects

Feel free to explore, contribute, and open issues if you encounter any. Happy organizing!

About

🎨ls-Improved is an advanced Linux command tool that, beyond 'ls', enables recording and displaying descriptive notes for each file and directory, simplifying identification, recall, and shared repository comprehension.

Resources

Stars

12 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages