This is a fork of logo-ls which I ended up maintaining since the original repository went unmaintained some years ago. Check the Installation Guide if you want to install it.
I fixed several bugs and implemented some additional features, including Nerd Fonts v3 migration and symlinks count. You can check a complete list of features and fixes on the CHANGELOG.md file.
- Implement custom time stamp formatting
- Implement filter by regex pattern to avoid listing unwanted files or subdirectories
- Show size of directories as the sum of the sizes of their contents (this would be different than the behavior of ls(coreutils))
- Add more tests
- Deploy to package managers
- Introduce a configuration file to customize the output
Feel free to contribute and I'll be more than happy to merge your changes. In case you want to add some new icons, please make a PR so that we can all benefit from that. The following sections explains how to do it.
In order to add new icons you need to:
- Fork the repository
- Add an entry in the map
IconSetinicons/icons_map.go. The key should be the name of the icon and not its extension (i.e.markdownfor markdown files). The value should be of typeIconInfo, a struct indicating the unicode character and its color. - Add one or more entries in the map
IconExtinicons/icon_ext.go, mapping the entry defined inIconSetto each one of the desired extensions
You can map an icon to a specific file name (i.e. tsconfig.json) by editing icons/icons_files.go. You can also override an icon for a specific file name (i.e. use a different icon for gitlab-ci.yml rather than the standard YML one) by editing icons/icons_sub_ext.go.
You can either use the install script to download the latest binary release or build it yourself (requires having go installed). In both cases, you should be using Nerd Fonts in your terminal to see the icons properly. The configuration depends on your terminal emulator, but generally it simply involves entering the settings and changing the font. You can download your preferred Nerd Font from here.
If you are on Linux or OSX you can run this script on your shell to download the latest version and move it to ~/.local/bin. The same command can be used also to update your current installation of logo-ls to the latest version:
curl -L https://raw.githubusercontent.com/canta2899/logo-ls/refs/heads/main/get.sh | shYou can do the same on Windows by running the following command in powershell
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
irm https://raw.githubusercontent.com/canta2899/logo-ls/main/get.ps1 | iexOtherwise, you can manually download the binary for your platform from the releases page. Then, you have to extract the archive (md5 checksums are provided in case you want to verify the integrity of the file) and move the executable binary of logo-ls to a directory in your $PATH (or symlink it).
In case you want to replace the original ls command with logo-ls, I would suggest adding an alias:
On OSX/Linux
alias ls="logo-ls"On Windows (powershell)
Set-Alias ls logo-lsClone the repository
git clone https://github.com/canta2899/logo-lsIf you want to install directly to your $GOPATH you can use go install.
go install ./cmd/logo-lsIf you want to build the binary you can use make:
# outputs executable 'logo-ls' in the root directory
make logo-ls# cleans up the executable from the repo
make clean