LF_CONFIG_HOME environment variable (#1253)
* Added LF_CONFIG_HOME environment variable * Added and generated documentation for LF_CONFIG_HOME
This commit is contained in:
1 parent
3b942a8a39
commit
8fee7f0927
4 files changed
+30
-13
No files matched your search
@@ -283,10 +283,14 @@ History file should be located at:
|
||||
|
||||
You can configure the default values of following variables to change these locations:
|
||||
|
||||
$XDG_CONFIG_HOME ~/.config
|
||||
$XDG_DATA_HOME ~/.local/share
|
||||
%ProgramData% C:\ProgramData
|
||||
%LOCALAPPDATA% C:\Users\<user>\AppData\Local
|
||||
Unix
|
||||
$XDG_CONFIG_HOME ~/.config
|
||||
$XDG_DATA_HOME ~/.local/share
|
||||
|
||||
Windows
|
||||
%ProgramData% C:\ProgramData
|
||||
%LOCALAPPDATA% C:\Users\<user>\AppData\Local
|
||||
%LF_CONFIG_HOME% If set, use this value instead of %LOCALAPPDATA%
|
||||
|
||||
A sample configuration file can be found at
|
||||
https://github.com/gokcehan/lf/blob/master/etc/lfrc.example
|
||||
|
||||
+8
-4
@@ -289,10 +289,14 @@ History file should be located at:
|
||||
You can configure the default values of following variables to change these
|
||||
locations:
|
||||
|
||||
$XDG_CONFIG_HOME ~/.config
|
||||
$XDG_DATA_HOME ~/.local/share
|
||||
%ProgramData% C:\ProgramData
|
||||
%LOCALAPPDATA% C:\Users\<user>\AppData\Local
|
||||
Unix
|
||||
$XDG_CONFIG_HOME ~/.config
|
||||
$XDG_DATA_HOME ~/.local/share
|
||||
|
||||
Windows
|
||||
%ProgramData% C:\ProgramData
|
||||
%LOCALAPPDATA% C:\Users\<user>\AppData\Local
|
||||
%LF_CONFIG_HOME% If set, use this value instead of %LOCALAPPDATA%
|
||||
|
||||
A sample configuration file can be found at
|
||||
https://github.com/gokcehan/lf/blob/master/etc/lfrc.example
|
||||
|
||||
@@ -330,10 +330,16 @@ History file should be located at:
|
||||
You can configure the default values of following variables to change these locations:
|
||||
.PP
|
||||
.EX
|
||||
$XDG_CONFIG_HOME ~/.config
|
||||
$XDG_DATA_HOME ~/.local/share
|
||||
%ProgramData% C:\eProgramData
|
||||
%LOCALAPPDATA% C:\eUsers\e<user>\eAppData\eLocal
|
||||
Unix
|
||||
$XDG_CONFIG_HOME ~/.config
|
||||
$XDG_DATA_HOME ~/.local/share
|
||||
.EE
|
||||
.PP
|
||||
.EX
|
||||
Windows
|
||||
%ProgramData% C:\eProgramData
|
||||
%LOCALAPPDATA% C:\eUsers\e<user>\eAppData\eLocal
|
||||
%LF_CONFIG_HOME% If set, use this value instead of %LOCALAPPDATA%
|
||||
.EE
|
||||
.PP
|
||||
A sample configuration file can be found at https://github.com/gokcehan/lf/blob/master/etc/lfrc.example
|
||||
|
||||
+4
-1
@@ -68,7 +68,10 @@ func init() {
|
||||
// remove domain prefix
|
||||
gUser.Username = strings.Split(gUser.Username, `\`)[1]
|
||||
|
||||
data := os.Getenv("LOCALAPPDATA")
|
||||
data := os.Getenv("LF_CONFIG_HOME")
|
||||
if data == "" {
|
||||
data = os.Getenv("LOCALAPPDATA")
|
||||
}
|
||||
|
||||
gConfigPaths = []string{
|
||||
filepath.Join(os.Getenv("ProgramData"), "lf", "lfrc"),
|
||||
|
||||
Reference in new issue
Block a user