use /bin/sh as the default for shell option

Mentioned in #58.
This commit is contained in:
Gokcehan 2016-12-27 19:05:41 +03:00
parent 97cc5f78a8
commit 79ca4cfe9d
5 changed files with 4 additions and 10 deletions

2
doc.go
View File

@ -57,7 +57,7 @@ The following options can be used to customize the behavior of lf:
filesep string (default ":") filesep string (default ":")
ifs string (default "") (not exported if empty) ifs string (default "") (not exported if empty)
previewer string (default "") (not filtered if empty) previewer string (default "") (not filtered if empty)
shell string (default "$SHELL") shell string (default "/bin/sh")
showinfo string (default "none") showinfo string (default "none")
sortby string (default "natural") sortby string (default "natural")
timefmt string (default "Mon Jan _2 15:04:05 2006") timefmt string (default "Mon Jan _2 15:04:05 2006")

View File

@ -61,7 +61,7 @@ The following options can be used to customize the behavior of lf:
filesep string (default ":") filesep string (default ":")
ifs string (default "") (not exported if empty) ifs string (default "") (not exported if empty)
previewer string (default "") (not filtered if empty) previewer string (default "") (not filtered if empty)
shell string (default "$SHELL") shell string (default "/bin/sh")
showinfo string (default "none") showinfo string (default "none")
sortby string (default "natural") sortby string (default "natural")
timefmt string (default "Mon Jan _2 15:04:05 2006") timefmt string (default "Mon Jan _2 15:04:05 2006")

View File

@ -5,12 +5,7 @@
#set nopreview #set nopreview
#set showinfo size #set showinfo size
# set shell interpreter accordingly # interpreter for shell commands (needs to be POSIX compatible)
# Some systems use more efficient shell implementations for non-interactive use
# (e.g. `dash`) mapped to `/bin/sh`. By setting this option here we can tell
# `lf` to use this implementation for shell commands. This can decrease the
# startup times of commands but may also change the syntax that you are used to
# (e.g. non-POSIX features provided by your regular shell).
#set shell /bin/sh #set shell /bin/sh
# set internal field seperator (IFS) to ':' # set internal field seperator (IFS) to ':'

View File

@ -15,7 +15,6 @@ var (
envHome = os.Getenv("HOME") envHome = os.Getenv("HOME")
envHost = os.Getenv("HOSTNAME") envHost = os.Getenv("HOSTNAME")
envPath = os.Getenv("PATH") envPath = os.Getenv("PATH")
envShell = os.Getenv("SHELL")
envConfig = os.Getenv("XDG_CONFIG_HOME") envConfig = os.Getenv("XDG_CONFIG_HOME")
) )

View File

@ -29,7 +29,7 @@ func init() {
gOpts.scrolloff = 0 gOpts.scrolloff = 0
gOpts.tabstop = 8 gOpts.tabstop = 8
gOpts.filesep = ":" gOpts.filesep = ":"
gOpts.shell = envShell gOpts.shell = "/bin/sh"
gOpts.showinfo = "none" gOpts.showinfo = "none"
gOpts.sortby = "natural" gOpts.sortby = "natural"
gOpts.timefmt = time.ANSIC gOpts.timefmt = time.ANSIC