jarun / nnn

n³ The unorthodox terminal file manager
BSD 2-Clause "Simplified" License
18.51k stars 743 forks source link

nuke: use sort -V #1830

Closed c79cea05 closed 4 months ago

c79cea05 commented 4 months ago
$ mkdir test
$ for x in {1..20}; do convert xc:red test/$x.png; done
$ nnn test
Press l

nnn lists these png files in ascending order, but sxiv doesn't. Adding -V option to sort(1) fixes this.

N-R-K commented 4 months ago

-V is not a standard flag, it's a GNU extension. I don't know how well it's supported in other sed implementations (busybox, BSDs etc).

c79cea05 commented 4 months ago

@N-R-K https://man.openbsd.org/OpenBSD-6.0/sort#V, https://man.freebsd.org/cgi/man.cgi?query=sort&manpath=FreeBSD+10.0-RELEASE https://git.busybox.net/busybox/commit/coreutils/sort.c?id=cbe8c65e590949cad25dccba90101553b77d88c9

jarun commented 4 months ago

Thanks guys!