aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2019-09-22 17:51:27 -0700
committerBruce Hill <bruce@bruce-hill.com>2019-09-22 17:51:27 -0700
commit0f0bacceb4e03547755fb5e05f3d5923b81614cb (patch)
treef71dd9e12b128bffcf59877823f2dc951e7d8e3c /Makefile
parentef577177747fd0a4778b92f762e0964d0ba3aafc (diff)
Now $@ is *always* the selected files, even if there are none. Cleaned
up the default bindings a bit to be more explicit about manipulating the cursor file vs. manipulated selected files. Added support for `ask -n` and generally confirming with a single 'y' keystroke instead of 'y<enter>' Also added a binding for `rename`-command batch renaming.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile2
1 files changed, 2 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index c72bf46..e3ce213 100644
--- a/Makefile
+++ b/Makefile
@@ -42,8 +42,10 @@ endif
CFLAGS += $(PICKER_FLAG)
ifneq (, $(ASKER))
+ PERCENT := %
ifeq ($(shell which $(ASKER)),$(shell which ask 2>/dev/null || echo '<none>'))
CFLAGS += -D'ASK(var, prompt, initial)=var "=\"$$(ask --history=bb."STRINGIFY(__COUNTER__)".hist --prompt=\"" prompt "\" --query=\"" initial "\")\""'
+ CFLAGS += -D'CONFIRM(action, files)=" { printf \"$(PERCENT)s\\n\" \""B(action)"\" \""files"\" | more; ask -n \"Is that okay?\"; } "'
endif
ifeq ($(shell which $(ASKER)),$(shell which dmenu 2>/dev/null || echo '<none>'))
CFLAGS += -D'ASK(var, prompt, initial)=var "=\"$$(printf \"" initial "\" | dmenu -p \"" prompt "\")\""'