From 0d6522fcd6c15369317198c00522552a561d6bd4 Mon Sep 17 00:00:00 2001 From: lachtan Date: Fri, 4 Jun 2021 06:23:56 +0200 Subject: [PATCH] Tuning speed script loading --- README.md | 12 +++--------- rc/direnv.sh | 2 -- rc/ssh-agent.sh | 4 ++-- rc/thefuck.sh | 7 ++++++- 4 files changed, 11 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 68cef4e..67fac4e 100644 --- a/README.md +++ b/README.md @@ -8,19 +8,13 @@ Add to $HOME/.bashrc file: After that each bash login is ready to offer full functionality. +For faster load can be set +`LWS_FAST=1` + ## Quick commands reload-workspace $LWS -## Sections -``` -bin/ -conf/ -doc/ -rc/ -scripts/ -``` - ### TODO - Tune gws for easy tiger compiling actions - IntelliJ IDEA diff --git a/rc/direnv.sh b/rc/direnv.sh index 06e9d28..b8538f1 100644 --- a/rc/direnv.sh +++ b/rc/direnv.sh @@ -2,6 +2,4 @@ if command -v direnv > /dev/null; then eval "$(direnv hook bash)" -else - echo "SKIP direnv" fi diff --git a/rc/ssh-agent.sh b/rc/ssh-agent.sh index a50725b..e83ca51 100644 --- a/rc/ssh-agent.sh +++ b/rc/ssh-agent.sh @@ -3,7 +3,7 @@ for key in id_ecdsa id_rsa; do key_filename="$HOME/.ssh/$key" if [ -f $key_filename ]; then - eval $(keychain --eval --quiet --agents ssh $key) + eval $(keychain --eval --quiet --agents ssh $key) + break fi done - diff --git a/rc/thefuck.sh b/rc/thefuck.sh index 2c95d17..d9c35f2 100644 --- a/rc/thefuck.sh +++ b/rc/thefuck.sh @@ -1 +1,6 @@ -eval "$(thefuck --alias)" +if [[ -z "$LWS_FAST" ]]; then + if type thefuck > /dev/null; then + eval "$(thefuck --alias)" + fi +fi +