acarl005 / ls-go Goto Github PK
View Code? Open in Web Editor NEWA more colorful, user-friendly implementation of `ls` written in Go
License: MIT License
A more colorful, user-friendly implementation of `ls` written in Go
License: MIT License
It appears neither sticky bit nor ACL "+" get shown when doing a directory listing:
# ls-go -l .
d rwx rwx r-x www-data www-data 4.00K 31.Jul'20 07:34 default
Comparing to regular ls:
# ls -l .
drwsrwsr-x+ 10 www-data www-data 4096 Jul 31 07:34 default
Not sure if ACL is possible to add. But sticky bit is pretty essential. :)
Panics when encountering a file or directory where there is no user mapping. Presumably the same will happen for non-mapped groups.
uname -a
Linux laptop 4.9.0-3-amd64 #1 SMP Debian 4.9.30-2+deb9u5 (2017-09-19) x86_64 GNU/Linux
go version
go version go1.9 linux/amd64
v0.0.2
nicolaw@laptop: ~/go/src/github.com/acarl005/ls-go $ git rev-parse HEAD
187bc787f33b3c1a82f68d3b3de205f3a26e79b9
panic: user: unknown userid 999
goroutine 1 [running]:
main.check(0x74c0e0, 0xc420390508)
/home/nicolaw/go/src/github.com/acarl005/ls-go/ls-go.go:603 +0x4a
main.getOwnerAndGroup(0xc42004f9d8, 0xc420019304, 0x7, 0xc4203904f0, 0x7)
/home/nicolaw/go/src/github.com/acarl005/ls-go/ls-unix.go:22 +0x18e
main.listFiles(0xc42038e640, 0x15, 0xc42004fbe8, 0x0)
/home/nicolaw/go/src/github.com/acarl005/ls-go/ls-go.go:147 +0x1a8
main.listDir(0xc42038e640, 0x15)
/home/nicolaw/go/src/github.com/acarl005/ls-go/ls-go.go:121 +0x31e
main.listDir(0xc4204c45c0, 0xb)
/home/nicolaw/go/src/github.com/acarl005/ls-go/ls-go.go:128 +0x2d9
main.listDir(0x631b44, 0x1)
/home/nicolaw/go/src/github.com/acarl005/ls-go/ls-go.go:128 +0x2d9
main.main()
/home/nicolaw/go/src/github.com/acarl005/ls-go/ls-go.go:86 +0x4ac
I know this may be obvious, but is there any license to go with this?
if i'm in a directory with a file named bar
if I run ls-go baz
I get a panic.
panic: stat baz: no such file or directory
goroutine 1 [running]:
main.check(0x74eb40, 0xc4200112c0)
/home/bugless/src/github.com/acarl005/ls-go/ls-go.go:478 +0x4a
main.main()
/home/bugless/src/github.com/acarl005/ls-go/ls-go.go:59 +0x1dd
When the group is unknown, ls-go will show the error below, then panic
panic: group: unknown groupid 1000
goroutine 1 [running]:
main.check(0x63fa20, 0xc42007e830)
/home/jiasui/repos/ls-go/src/github.com/acarl005/ls-go/ls-go.go:603 +0x4a
main.getOwnerAndGroup(0xc4200ddc30, 0x1a4, 0x0, 0x0, 0x1)
/home/jiasui/repos/ls-go/src/github.com/acarl005/ls-go/ls-unix.go:24 +0x1b4
main.listFiles(0x619564, 0x1, 0xc4200dde38, 0x0)
/home/jiasui/repos/ls-go/src/github.com/acarl005/ls-go/ls-go.go:189 +0x59f
main.listDir(0x619564, 0x1)
/home/jiasui/repos/ls-go/src/github.com/acarl005/ls-go/ls-go.go:121 +0x2e8
main.main()
/home/jiasui/repos/ls-go/src/github.com/acarl005/ls-go/ls-go.go:86 +0x45d
Reproduce step:
I often use the reverse sorting option with ls
, particularly when sorting by time. I am not sure what flags would be appropriate here since -r
and -R
are already in use.
Hello, I really love this tool, but there are a couple of things that would increase my pleasure even more!
--nerd-font
, to optionally specify that an extra space be displayed between the nerdchar and the file/folder name?It may be that ls-go
already supports these options and I just haven't found them yet.
Alternatively, I guess I could just fork the Golang code. Hmm... there's an idea!
When trying to build on Windows, I get these errors:
# github.com/acarl005/ls-go
..\..\..\..\acarl005\ls-go\ls-windows.go:59:10: undefined: syscall.Stat_t
..\..\..\..\acarl005\ls-go\ls-windows.go:60:9: undefined: syscall.Stat
..\..\..\..\acarl005\ls-go\ls-windows.go:62:35: undefined: "golang.org/x/sys/windows".Major
..\..\..\..\acarl005\ls-go\ls-windows.go:63:35: undefined: "golang.org/x/sys/windows".Minor
It seems that syscall.Stat_t
is only available on Linux systems, and I'm not sure when windows.Major/Minor
was deprecated...
macOS 10.13.6
Golang 1.10.3
Git 2.13.0
Hello. I've just tried running ls-go.go with vgo run ls-go.go
, but I get a bunch of errors:
# command-line-arguments
./ls-go.go:54:2: undefined: argsPostParse
./ls-go.go:59:27: undefined: args
./ls-go.go:103:10: undefined: args
./ls-go.go:106:31: undefined: args
./ls-go.go:115:12: undefined: args
./ls-go.go:116:10: undefined: args
./ls-go.go:124:6: undefined: args
./ls-go.go:126:50: undefined: args
./ls-go.go:145:6: undefined: args
./ls-go.go:147:20: undefined: getOwnerAndGroup
./ls-go.go:147:20: too many errors
What am I doing wrong? Thanks!
It seems that in Warp terminal I cant autocomplete tabs through TAB button. Maybe I shoud add something to my configuration?
Can you please add file and directory SELinux contexts as an option to the output?
Basically i am working on small modifications to my fork of Gosh
and i want to implement this into my project
I am looking for a half decent implementation of ls
and other directory management utilities in go, and this one fits the bill for the most part
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.