Commit Graph
8 Commits
Author SHA1 Message Date
Karol Woźniak fe05105c88 Implement directory count info (#85) 2017-06-03 14:12:43 +03:00
Karol Woźniak 79728a93da Properly close file handle in readdir (#74) 2017-04-09 16:15:06 +03:00
Karol Woźniak 8be854d3ba Add reverse option (#55) 2016-12-26 23:49:18 +03:00
Karol Woźniak a4c395a4de Refactor sorting types to only implement Len and Swap once (#43)
Using "trick" similar to `sort.Slice` that's comming in `go1.8`.
2016-11-10 01:01:30 +03:00
Karol Woźniak c9b4389c65 Refactor Nav API around symlinks handling (mostly) (#33)
* gofmt ui.go

* Refactor Nav API around symlinks handling (mostly)

1. Get both `Lstat` and `Stat` while reading the files. Stat info is
   used by default, but we still can tell it's a link if needed.
2. Remove all other `Stat` calls from different places.
3. Handle hidden files while reading.
4. `currFile` now returns error if there are no files.
5. `currEmpty` and `currPath` not longer necessary, removed.
6. `open` now returns a named error ErrNotDir, where expected.

7. Side effect: Links that point at directories are now sorted among
   "actual" directories.
2016-10-24 22:18:31 +03:00
KenjiTakahashi ef340a533d Do binary check after calling previewer
Many files valid for previewer, such as archives, are treated as binary
and thus were not passed to the previewer.

Also sanitizes the previewer output, to some extent.
2016-09-01 21:11:03 +02:00
KenjiTakahashi 8d4a3192f1 Pass width and height to the previewer
This way, the script can do a little magic like

 head -n $2 $1 | highlight -O ansi --syntax ${1##*.}

to avoid reading whole (possibly huge) file.
2016-09-01 00:19:08 +02:00
KenjiTakahashi 14270be5ed Remove opener option from docs 2016-08-27 02:57:15 +02:00