mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-18 00:03:39 -05:00
Refactor the code to remove global variables
This commit is contained in:
@@ -86,11 +86,12 @@ func (r *Reader) terminate() {
|
||||
r.mutex.Unlock()
|
||||
}
|
||||
|
||||
func (r *Reader) restart(command string, environ []string) {
|
||||
func (r *Reader) restart(command commandSpec, environ []string) {
|
||||
r.event = int32(EvtReady)
|
||||
r.startEventPoller()
|
||||
success := r.readFromCommand(command, environ)
|
||||
success := r.readFromCommand(command.command, environ)
|
||||
r.fin(success)
|
||||
removeFiles(command.tempFiles)
|
||||
}
|
||||
|
||||
func (r *Reader) readChannel(inputChan chan string) bool {
|
||||
|
||||
Reference in New Issue
Block a user