mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2024-11-26 23:06:34 +00:00
Fix exit conditions of --select-1 and --exit-0
This commit is contained in:
parent
f3177305d5
commit
baad26a0fd
@ -94,7 +94,8 @@ func Run(options *Options) {
|
|||||||
chunks: chunkList.Snapshot(),
|
chunks: chunkList.Snapshot(),
|
||||||
pattern: pattern}, limit)
|
pattern: pattern}, limit)
|
||||||
|
|
||||||
if !cancelled && (filtering || opts.Exit0) {
|
if !cancelled && (filtering ||
|
||||||
|
opts.Exit0 && len(matches) == 0 || opts.Select1 && len(matches) == 1) {
|
||||||
if opts.PrintQuery {
|
if opts.PrintQuery {
|
||||||
fmt.Println(patternString)
|
fmt.Println(patternString)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user