Dirfirst option and numerical sorting (#27)
* Create option dirfirst, and add numerical sorting * Add only dirfirst option
This commit is contained in:
1 parent
d36e272272
commit
2345e16794
6 files changed
+20
-2
No files matched your search
@@ -107,9 +107,11 @@ func organizeFiles(fi []os.FileInfo) []os.FileInfo {
|
||||
log.Printf("unknown sorting type: %s", gOpts.sortby)
|
||||
}
|
||||
|
||||
// TODO: these should be optional
|
||||
if gOpts.dirfirst {
|
||||
sort.Stable(ByDir(fi))
|
||||
}
|
||||
//TODO this should be optional
|
||||
sort.Stable(ByNum(fi))
|
||||
sort.Stable(ByDir(fi))
|
||||
|
||||
return fi
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user