aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2019-09-21 18:18:08 -0700
committerBruce Hill <bruce@bruce-hill.com>2019-09-21 18:18:08 -0700
commita881d4ba4aa4d0c4973aa914f1ea85b502fabee1 (patch)
treeb65f365749dfe1d8a7f8edb06725f8194defb88a
parenteca5a5a8b1de1a6118853181be5d0caf6a562890 (diff)
Consolidated new file/new dir and changed move to ctrl-v by default
-rw-r--r--config.def.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/config.def.h b/config.def.h
index b9c020c..ea81fb6 100644
--- a/config.def.h
+++ b/config.def.h
@@ -241,7 +241,7 @@ binding_t bindings[] = {
{{'e'}, "$EDITOR \"$@\" || "PAUSE, B("Edit")" file in $EDITOR"},
{{'d', KEY_DELETE}, CONFIRM("The following will be deleted:", "$@") " && rm -rf \"$@\" && bb +refresh && bb +deselect: \"$@\"",
B("Delete")" files"},
- {{'m'}, "test $BBSELECTED || exit; "
+ {{KEY_CTRL_V}, "test $BBSELECTED || exit; "
"if " CONFIRM("The following will be moved here:", "$@") "; then "
SPIN("mv -i \"$@\" . && bb +refresh && bb +deselect: \"$@\" && for f; do bb \"+sel:$(basename \"$f\")\"; done")" || "PAUSE
"; fi",
@@ -251,8 +251,10 @@ binding_t bindings[] = {
SPIN("cp -ri \"$f\" \"$(basename \"$f\").copy\"")"; "
"else "SPIN("cp -ri \"$f\" .")"; fi; done; bb +refresh",
B("Copy")" the selected files here"},
- {{'n'}, ASK("name", "New file: ", "")" && touch \"$name\" && bb \"+goto:$name\" +r || "PAUSE, B("New file")},
- {{'N'}, ASK("name", "New dir: ", "")" && mkdir \"$name\" && bb \"+goto:$name\" +r || "PAUSE, B("New directory")},
+ {{KEY_CTRL_N}, "type=\"$(printf '%s\\n' File Directory | "PICK("Create new: ", "")")\" "
+ "&& "ASK("name", "New $type: ", "")" && "
+ "{ if test $type = File; then touch \"$name\"; else mkdir \"$name\"; fi "
+ "&& bb \"+goto:$name\" +r || "PAUSE"; }", B("New")" file/directory"},
{{'p'}, "$PAGER \"$@\"", B("Page")" through a file in $PAGER"},
{{'|'}, ASK("cmd", "|", "") " && printf '%s\\n' \"$@\" | sh -c \"$BBSHELLFUNC$cmd\"; " PAUSE "; bb +r",
B("Pipe")" selected files to a command"},