g
a powerful ls
g is a ls alternative with features:
- display items with type-specific icons and colors that are easy to be customized
- display in various layouts ( grid/across/byline/tree/zero/comma )
- user-friendly options with many alias
- distinguish file git-status with icons or char symbols
- highly customizable sort option
- cross-platform ( Linux/Windows/MacOS )
- option to fuzzy match path like
zoxide
with fzf
algorithm
Screenshots
install
From source
go version required >= 1.20
go install -ldflags="-s -w -v" github.com/Equationzhao/g@latest
or Clone this repo
git clone github.com/Equationzhao/g
cd g
go build -ldflags="-s -w" # use -s -w to shrink size
# then add the executable file to your `PATH`
Via package manager
user can install g
from AUR
yay -S g-ls
windows Scoop
scoop install https://raw.githubusercontent.com/Equationzhao/g/master/scoop/g.json
# upgrade
scoop uninstall g # uninstall first
scoop install https://raw.githubusercontent.com/Equationzhao/g/master/scoop/g.json
# error msg like this can be ignored
# Move-Item:
# Line |
# 2 | mv g-amd64.exe g.exe
# | ~~~~~~~~~~~~~~~~~~~~
# Move-Item:
# Line |
# 3 | mv g-amd64.shim g.shim
# | ~~~~~~~~~~~~~~~~~~~~~~
homebrew: todo
Pre-built executable
just download from release page and add the executable file to your PATH
binaries with -upx are compressed by upx
with --best
option
usage
g path(s)
with icon
g -si path
g -icons path
with mod(default) time
g -st path
g -show-time path
g -time path
with access/create/mod time
g -st -time-type="access" path
with fileperm
g -sp path
g -permission path
with owner/group
g -so path
g -owner path
g -sg path
g -group path
with size
g -ss path
g -size path
show all files, including hidden files
g -sh path
g -a path
show dir only
g -sd path
g -dir path
list by line
g -1 path
g -bl path
g -oneline path
g -single-column path
show file only with target ext
g -ext=<target ext(s)> path
list in tree
g -t path
g -tree path
recurse into directories
g -R path
g -recurse path
limit depth in tree/recurse (default: no limit)
g -t -depth=<level> path
g -R -depth=<level> path
fuzzy search
g -f path
g -fuzzy path
# eg: g -f in
# /mnt/e/Project/gverything/index
# pathindex.go
disable index update
g -di path
g -no-update path
g -disable-index path
disable color
g -nc path
g -no-color path
g -colorless path
show checksum (md5,sha1,sha224,sha256,sha384,sha512,crc32)
g -cs -ca=sha256 path
show git status with icon
g -gs path
g -git path
g -git-status path
show git status with char symbol
g -git -git-style=sym path
...
More options
g.md
custom theme
theme
logo
created by bing
/ Recent activity