diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2019-05-31 19:48:43 -0700 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2019-05-31 19:48:43 -0700 |
| commit | 1ae281d3f93261d920b2b460746cb4a250ebac62 (patch) | |
| tree | e7cb29e5ce19372f54348de77fcf6550919dd578 /config.def.h | |
| parent | 18b98c8543748ae0f3aae1fa82e5f28ee3da11e2 (diff) | |
Inlined PIPE_SELECTION_TO since it's only used once
Diffstat (limited to 'config.def.h')
| -rw-r--r-- | config.def.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/config.def.h b/config.def.h index a04c6f0..3c84d1c 100644 --- a/config.def.h +++ b/config.def.h @@ -74,7 +74,6 @@ #define DIR_COLOR "\033[34m" #define EXECUTABLE_COLOR "\033[31m" -#define PIPE_SELECTION_TO " printf '%s\\n' \"$@\" | " #define PAUSE " read -n1 -p '\033[2mPress any key to continue...\033[0m\033[?25l'" #define NORMAL_TERM (1<<0) @@ -169,7 +168,7 @@ else xdg-open "$BBCURSOR"; fi {{'C'}, "bb '+de:*'; for f; do cp \"$f\" \"$f.copy\" && bb \"+sel:$f.copy\"; done; bb +r", EM("Clone")" files"}, {{'n'}, "name=`bb '?New file: '` && touch \"$name\"; bb +r \"+goto:$name\"", EM("New file")}, {{'N'}, "name=`bb '?New dir: '` && mkdir \"$name\"; bb +r \"+goto:$name\"", EM("New directory")}, - {{'|'}, "cmd=`bb '?|'` && " PIPE_SELECTION_TO "sh -c \"$cmd\" && " PAUSE "; bb +r", + {{'|'}, "cmd=`bb '?|'` && printf '%s\\n' \"$@\" | sh -c \"$cmd\"; " PAUSE "; bb +r", EM("Pipe")" selected files to a command"}, {{':'}, "sh -c \"`bb '?:'`\" -- \"$@\"; " PAUSE "; bb +refresh", EM("Run")" a command"}, |
