Refactor the code so that fzf can be used as a library (#3769)

This commit is contained in:
Junegunn Choi
2024-05-07 01:06:42 +09:00
committed by GitHub
parent 065b9e6fb2
commit e8405f40fe
32 changed files with 1152 additions and 893 deletions

View File

@@ -61,7 +61,7 @@ func (x *Executor) Become(stdin *os.File, environ []string, command string) {
shellPath, err := exec.LookPath(x.shell)
if err != nil {
fmt.Fprintf(os.Stderr, "fzf (become): %s\n", err.Error())
Exit(127)
os.Exit(127)
}
args := append([]string{shellPath}, append(x.args, command)...)
SetStdin(stdin)