From 63dbf4854632b52d21757f9a7675726bdd840c16 Mon Sep 17 00:00:00 2001 From: Gene Pavlovsky Date: Sat, 23 Apr 2016 03:44:41 +0300 Subject: [PATCH] Update key-bindings.bash Faster startup. Use internal bash globbing instead of external grep binary (adapter from Gentoo's `/etc/bash/bashrc` TERM checking). Insignificant on Linux, but on Cygwin this cuts startup time by 40 ms on my Core i7 laptop. --- shell/key-bindings.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/key-bindings.bash b/shell/key-bindings.bash index 47adf30..8ecd614 100644 --- a/shell/key-bindings.bash +++ b/shell/key-bindings.bash @@ -65,7 +65,7 @@ if [ -n "$TMUX_PANE" ]; then [ $BASH_VERSINFO -gt 3 ] && __use_tmux_auto=1 fi -if [ -z "$(set -o | \grep '^vi.*on')" ]; then +if [[ $'\n'$(set -o) != *$'\n'vi*on* ]]; then # Required to refresh the prompt after fzf bind '"\er": redraw-current-line' bind '"\e^": history-expand-line'