m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-18 00:03:39 -05:00

Implement CTRL-D

This commit is contained in:
Junegunn Choi
2014-06-12 23:43:09 +09:00
parent 9dac12cb32
commit c3a4e4cd23
2 changed files with 9 additions and 2 deletions

10
fzf
View File

@@ -7,7 +7,7 @@
# / __/ / /_/ __/
# /_/ /___/_/ Fuzzy finder for your shell
#
# Version: 0.8.5 (Jun 7, 2014)
# Version: 0.8.5 (Jun 12, 2014)
#
# Author: Junegunn Choi
# URL: https://github.com/junegunn/fzf
@@ -881,7 +881,13 @@ class FZF
}
actions = {
:esc => proc { exit 1 },
ctrl(:d) => proc { exit 1 if input.empty? },
ctrl(:d) => proc {
if input.empty?
exit 1
elsif cursor < input.length
input = input[0...cursor] + input[(cursor + 1)..-1]
end
},
ctrl(:m) => proc {
got = pick
exit 0