Skip to content
Myr

Show error message when failed to start preview command (#1810)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Fix #1637

authored by Tony Metzidis · committed by Junegunn Choi · parent f7b26b3 · Browse files · 3 files+7 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+7 added−2 removed

  • other:+7 added−2 removed

3 files+7 added−2 removed

modified:src/terminal.go+4 added-1 removed
1574 unmodified lines
1575 }1576 var out bytes.Buffer1577 cmd.Stdout = &out1578 cmd.Stderr = &out1579 cmd.Start()1579 err := cmd.Start()1580 if err != nil {1581 out.Write([]byte(err.Error()))1582 }1583 finishChan := make(chan bool, 1)1584 updateChan := make(chan bool)1585 go func() {1586 select {
603 unmodified lines
modified:.gitignore+1 added
6 unmodified lines
7doc/tags8vendor9gopath10*.zwc11fzf
modified:README.md+2 added-1 removed
478 unmodified lines
479480### Preview window481482When `--preview` option is set, fzf automatically starts an external process with483the current line as the argument and shows the result in the split window.483the current line as the argument and shows the result in the split window. Your484`$SHELL` is used to execute the command with `$SHELL -c COMMAND`485486```bash487# {} is replaced to the single-quoted string of the focused line488fzf --preview 'cat {}'
117 unmodified lines