mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2024-11-24 21:57:36 +00:00
Minor refactoring
This commit is contained in:
parent
587df594b8
commit
b99d884e57
12
src/core.go
12
src/core.go
@ -148,18 +148,20 @@ func Run(opts *Options) (int, error) {
|
||||
|
||||
// Terminal I/O
|
||||
var terminal *Terminal
|
||||
var err error
|
||||
var initialEnv []string
|
||||
initialReload := opts.extractReloadOnStart()
|
||||
if opts.Filter == nil {
|
||||
var err error
|
||||
terminal, err = NewTerminal(opts, eventBox, executor)
|
||||
if err != nil {
|
||||
return ExitError, err
|
||||
}
|
||||
initialEnv = terminal.environ()
|
||||
var temps []string
|
||||
initialReload, temps = terminal.replacePlaceholderInInitialCommand(initialReload)
|
||||
defer removeFiles(temps)
|
||||
if len(initialReload) > 0 {
|
||||
var temps []string
|
||||
initialReload, temps = terminal.replacePlaceholderInInitialCommand(initialReload)
|
||||
initialEnv = terminal.environ()
|
||||
defer removeFiles(temps)
|
||||
}
|
||||
}
|
||||
|
||||
// Reader
|
||||
|
Loading…
Reference in New Issue
Block a user