From be43ba0a2977e73e601e3112591b00fbaf52fb4a Mon Sep 17 00:00:00 2001 From: Luis Mondesi Date: Fri, 5 Sep 2025 11:29:33 -0400 Subject: [PATCH 1/4] fix: less verbose --- share/shell/ssh-agent-setup.bash | 42 ++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 13 deletions(-) diff --git a/share/shell/ssh-agent-setup.bash b/share/shell/ssh-agent-setup.bash index ca834412..ee0008e9 100644 --- a/share/shell/ssh-agent-setup.bash +++ b/share/shell/ssh-agent-setup.bash @@ -2,18 +2,20 @@ # Luis Mondesi # 2012-07-30 # -# Note that this script should run on all sh-like shells, -# not only bash. +# Source this script to start an ssh-agent and load your keys, typically at login # # . ssh-agent-setup # from ~/.profile # # License: GPL # CHANGES: +# 2025-09-05 - make it quieter. Use DEBUG env var for debug output # 2025-05-22 - add support for ssh-agent # 2022-10-20 - simplify loading keys # 2022-05-24 - adds logic to support Darwin -echo "# running $0 (~/.ssh-agent-setup.bash)" +if [[ $DEBUG ]]; then + echo "# running $0 (~/.ssh-agent-setup.bash)" +fi ENV_FILE="$HOME/.ssh-agent.env" @@ -23,23 +25,33 @@ clean_old_sock() { } launch_agent() { - echo "# launching new ssh-agent" + if [[ $DEBUG ]]; then + echo "# launching new ssh-agent" + fi ssh-agent -s > "$ENV_FILE" source "$ENV_FILE" >/dev/null - echo "# ssh-agent started and environment saved to $ENV_FILE" + if [[ $DEBUG ]]; then + echo "# ssh-agent started and environment saved to $ENV_FILE" + fi } load_agent() { - if [ -f "$ENV_FILE" ]; then - echo "# loading ssh-agent from $ENV_FILE" + if [[ -f "$ENV_FILE" ]]; then + if [[ $DEBUG ]]; then + echo "# loading ssh-agent from $ENV_FILE" + fi source "$ENV_FILE" if ! ssh-add -l > /dev/null 2>&1; then - echo "# agent not responding, launching new one" + if [[ $DEBUG ]]; then + echo "# agent not responding, launching new one" + fi clean_old_sock launch_agent fi else - echo "# no existing agent, launching new one" + if [[ $DEBUG ]]; then + echo "# no existing agent, launching new one" + fi launch_agent fi } @@ -50,19 +62,23 @@ add_keys() { ! -name '*.pub' | while read -r key; do if ssh-add -l 2>/dev/null | grep -q "$key"; then - echo "# Key $key already loaded" + if [[ $DEBUG ]]; then + echo "# Key $key already loaded" + fi continue fi - echo "# Loading key $key" + if [[ $DEBUG ]]; then + echo "# Loading key $key" + fi ssh-add "$key" rc=$? - if [ "$rc" = 2 ]; then + if [[ "$rc" == 2 ]]; then echo "# Repairing ssh-agent ($rc)" clean_old_sock launch_agent ssh-add "$key" - elif [ "$rc" = 1 ]; then + elif [[ "$rc" == 1 ]]; then echo "# Your key $key could not be loaded" fi done From 2a089159dcbfe75c8c76d0eb0ed26ddf78aba97a Mon Sep 17 00:00:00 2001 From: Luis Mondesi Date: Fri, 5 Sep 2025 11:31:16 -0400 Subject: [PATCH 2/4] fix: more quiet --- share/shell/ssh-agent-setup.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/shell/ssh-agent-setup.bash b/share/shell/ssh-agent-setup.bash index ee0008e9..5f2145f1 100644 --- a/share/shell/ssh-agent-setup.bash +++ b/share/shell/ssh-agent-setup.bash @@ -40,7 +40,7 @@ load_agent() { if [[ $DEBUG ]]; then echo "# loading ssh-agent from $ENV_FILE" fi - source "$ENV_FILE" + source "$ENV_FILE" >/dev/null if ! ssh-add -l > /dev/null 2>&1; then if [[ $DEBUG ]]; then echo "# agent not responding, launching new one" From 665f1197b9381d65ac71502d5c0aeb2d6419ea83 Mon Sep 17 00:00:00 2001 From: Luis Mondesi Date: Fri, 5 Sep 2025 11:31:51 -0400 Subject: [PATCH 3/4] feat: latest copilot --- share/vim/pack/vendor/start/copilot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/vim/pack/vendor/start/copilot b/share/vim/pack/vendor/start/copilot index 3955014c..f3d66c14 160000 --- a/share/vim/pack/vendor/start/copilot +++ b/share/vim/pack/vendor/start/copilot @@ -1 +1 @@ -Subproject commit 3955014c503b0cd7b30bc56c86c56c0736ca0951 +Subproject commit f3d66c148aa60ad04c0a21d3e0a776459de09eb2 From f9a1a2396d316fa92f85e04a050abb87441673d2 Mon Sep 17 00:00:00 2001 From: Luis Mondesi Date: Fri, 5 Sep 2025 11:45:37 -0400 Subject: [PATCH 4/4] fix: adds submodule init --- .gitignore | 8 ++++---- scripts/update-host | 2 +- share/shell/bashrc | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 58fab472..83e7f26d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,7 @@ +*.app *.bak +*.desktop +*.exe *.log .*.swp .DS_Store @@ -12,8 +15,5 @@ man opt pino share/mutt/mail* -think* -*.desktop -*.app -*.exe share/vim/systags +think* diff --git a/scripts/update-host b/scripts/update-host index 1d650b73..ab8bb1c0 100755 --- a/scripts/update-host +++ b/scripts/update-host @@ -947,7 +947,7 @@ sub _do_submodules if ($? != 0) { print STDERR ("Failed to update git submodules. Please run:\n"); - print STDERR ("cd $ENV{'HOME'}/Applications && git submodule update --remote --merge\n"); + print STDERR ("cd $ENV{'HOME'}/Applications && git submodule update --init --remote --merge\n"); _exit_safe(1); } } diff --git a/share/shell/bashrc b/share/shell/bashrc index 8ddc8aa3..30724a00 100644 --- a/share/shell/bashrc +++ b/share/shell/bashrc @@ -262,7 +262,7 @@ alias vcl='git logline' alias vcf='git fsck' alias vcg='git gc' # --prune is wrong as default alias vct='git tag' -alias vcy='git submodule update --remote --merge' # download/fetch submodule changes, merge those changes into my repository +alias vcy='git submodule update --init --remote --merge' # download/fetch submodule changes, merge those changes into my repository alias diff='diff -burN'