🥛 Milked out ' ls ' command
Go to file
milky a510a8100a
🎉 Initial fork
Signed-off-by: milky <op@gfy.lol>
2022-07-19 13:02:36 -07:00
assets 🎉 Initial fork 2022-07-19 13:02:36 -07:00
internal 🎉 Initial fork 2022-07-19 13:02:36 -07:00
.gitignore 🎉 Initial fork 2022-07-19 13:02:36 -07:00
HELP.md 🎉 Initial fork 2022-07-19 13:02:36 -07:00
LICENSE ♻️ Minimal fork 2022-07-15 10:32:51 -07:00
README.md 🎉 Initial fork 2022-07-19 13:02:36 -07:00
go.mod 🎉 Initial fork 2022-07-19 13:02:36 -07:00
go.sum ⬆️ deps 2022-07-15 10:38:25 -07:00
main.go 🎉 Initial fork 2022-07-19 13:02:36 -07:00


Milked out fork of a modern ' ls ' command with beautiful icons and git integrations.


This was forked because U+FB12 wasn't showing within my tmux sessions, so the class nf-mdi-file_hidden was replaced with nf-oct-file_code (U+F40D). Also, not everything matched my system-wide color scheme well enough, so I did tweak a lot of the previously used colors with more vibrant hues.


Updated: ~Tues, July 19th 2022 at 12:40:00 MST

Milestone Summary:

Status Goal
Minimal fork
🚫 Add preview images
🚫 Reimplement gorelease
🚫 Support more glyphs


All supported flags can be found by using help flag: milk-ls --help

The same documentation has been provided within: HELP.md


Almost all flags are same as that of the classic ' ls ' command and behave similarly, meaning that the project can be used as a drop-in replacement. This project uses getopt which is a golang variant of the classic getopt utility used in ' ls ' (coreutiles). Thus any combination of flags are possible and can be used.

-1 :

List one entry per line

-a (or) --all:

Doesn't ignore hidden files or dirs (entries starting with .)

-A (or) --almost-all:

Doesn't ignore hidden files or dirs (but hides ./ and ../)

-D (or) --git-status:

Add git status to the listed files and dirs

  • Note: As much I would love to make this the default behavior of the command but showing git status the is an intensive task and is obviously just a tad slower.

-l: Shows in long listing format

  • Other similar commands are:
    • -o: Like -l, but do not list group information
    • -g: Like -l, but do not list owner
    • -G (or) --no-group: In a long listing, don't print group names

-R (or) --recursive:

Lists subdirectories recursively

-? (or) --help:

Prints the help message

  • Similar message can be found at HELP.md.


There are many sorting flags (default is in alphabetic order)

  • -t: Sort by modification time, newest first
  • -S: Sort by file size, largest first
  • -X: Sort alphabetically by entry extension
  • -U: Do not sort; list entries in directory order
  • -v: Natural sort of (version) numbers within text
  • -r (or) -reverse: Reverse order while sorting

-T (or) --time-style=value:

Set time/date format in long formats

  • -l, -o, -g: There are many options to chose from all are listed in HELP.md.

-i (or) --disable-icon:

Doesn't print any icons

-c (or) --disable-color:

Doesn't color icons, filenames and git status

  • Note: use a combination of -ic to print output to a file $ milk-ls -ic > t.txt

Multiple Files and Directories:

You can provide multiple files and directories as command argument (defaults to PWD) and all will be displayed accordingly.



In-order to get milk-ls working properly, you need the following:

  • UTF-8: A terminal that is UTF-8 encoded (can display Unicode-Code point).
  • True Color Support: A terminal that can display color. For more info on colors in the terminal, see here.
  • Patched Nerd Font: A patched Nerd font is required to display these icons on-screen. Basically, you'll either download a pre-patched font or patch a font yourself by taking the current font and replacing the last few unicode points (approx 2,824 out of 143,859) with nerdy icons 🤓. The complete patching process is given here


It's just as simple to build this tool from source. You should have Golang installed on your system.

Step 1:

Clone this repository.

$ git clone https://git.tcp.direct/milky/milk-ls.git

Step 2:

cd into the directory milk-ls. Then run go mod tidy to download the dependencies, after that run go build to build your system specific binary in the current directory.

$ cd milk-ls
$ go mod tidy
$ go build

Step 3:

Place the milk-ls executable binary in a reachable directory (within the$PATH env variable). For me, I'd choose relocate it to either $GOPATH/bin or /usr/bin.

$ sudo cp milk-ls /usr/bin


Personally, I have only one alias in ~/.bashrc that does the trick for me.

alias ls="milk-ls -A"