add user defined options (#865)

This commit is contained in:
Christian Zangl authored and GitHub committed 2022-10-15 15:50:21 +03:00
1 parent 62621736b3
commit a2fed6d16e
6 files changed
+36 -1

No files matched your search

+5
View File
@@ -152,6 +152,11 @@ func exportOpts() {
dirfirst := strconv.FormatBool(gOpts.sortType.option&dirfirstSort != 0)
os.Setenv("lf_dirfirst", dirfirst)
} else if name == "lf_user" {
// set each user option
for key, value := range gOpts.user {
os.Setenv(name+"_"+key, value)
}
} else {
field := e.Field(i)
value := fieldToString(field)