From dceee59dfe156e069605ff336d11599479401d6f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 29 Jul 2026 19:36:13 +0000 Subject: [PATCH 01/11] feat(bash): add globstar, checkwinsize, autocd, dirspell, histverify options --- .config/bash/options.bash | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.config/bash/options.bash b/.config/bash/options.bash index 9b61631..dd9ff3f 100644 --- a/.config/bash/options.bash +++ b/.config/bash/options.bash @@ -24,3 +24,18 @@ shopt -s extglob # case-insensitive glob matching shopt -s nocaseglob + +# enable ** recursive globbing (e.g. ls **/*.rb) +shopt -s globstar + +# update LINES/COLUMNS after each command (fixes resize artefacts) +shopt -s checkwinsize + +# cd by typing a path alone, without the cd command +shopt -s autocd + +# spell-correction for directory tab-completion +shopt -s dirspell + +# show history expansion result in readline buffer before executing +shopt -s histverify From 6c76f6566c89540914f74096b1ec85d2c8c55602 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 29 Jul 2026 19:36:24 +0000 Subject: [PATCH 02/11] feat(bash): add readline visual completion options to .inputrc --- .inputrc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.inputrc b/.inputrc index 1e5a927..9599c8d 100644 --- a/.inputrc +++ b/.inputrc @@ -5,3 +5,11 @@ set show-all-if-ambiguous on set show-mode-in-prompt on set vi-cmd-mode-string \1\e[2 q\2 set vi-ins-mode-string \1\e[1 q\2 + +# Visual improvements +set colored-stats on +set colored-completion-prefix on +set mark-symlinked-directories on +set visible-stats on +set menu-complete-display-prefix on +set page-completions off From ce8a6634fc094b26ffd5043af7dd9dbb54a6a3be Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 29 Jul 2026 19:36:34 +0000 Subject: [PATCH 03/11] fix(bash): use dynamic default branch in merged alias instead of hardcoded master --- .aliases | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.aliases b/.aliases index 0a06743..184f25d 100644 --- a/.aliases +++ b/.aliases @@ -45,7 +45,7 @@ alias glgcm='git log --before=$(date -d"+ 1 month" "+%Y-%m-01") --after=$(date " alias glgt='git log --since="yesterday" --author="$(git config user.name)" --pretty=format:"%cd - %h - %s" \ --date=short --no-merges' alias reflog='git reflog --pretty=raw | tig --pretty=raw' -alias merged='git branch --merged master | grep -v master | xargs -n 1 git branch -d && git fetch --prune' +alias merged='git branch --merged "$(git symbolic-ref --short refs/remotes/origin/HEAD 2>/dev/null | sed "s|origin/||")" | grep -v "^\*\|master\|main" | xargs -n 1 git branch -d && git fetch --prune' alias gsw='git switch' alias gswc='git switch -c' alias grs='git restore' From 9118e9cebb86536e8253b1efc0bf27e8cb9307cd Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 29 Jul 2026 19:36:43 +0000 Subject: [PATCH 04/11] docs(bash): fix stale comment referencing ag instead of rg in .profile --- .profile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.profile b/.profile index aec0f17..1152f05 100644 --- a/.profile +++ b/.profile @@ -96,7 +96,7 @@ export MYSQL_PS1='(\D) \u@\h [\d] > ' # 20ms for key sequences export KEYTIMEOUT=20 -# Setting ag as the default source for fzf +# Setting rg as the default source for fzf export FZF_DEFAULT_COMMAND='rg --files --ignore-vcs --hidden' # fzf preview From 0b0600a434c001ff51e7ceb683b48877096aebc9 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 29 Jul 2026 19:36:52 +0000 Subject: [PATCH 05/11] fix(bash): replace deprecated egrep/fgrep binaries with grep -E/grep -F --- .aliases | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.aliases b/.aliases index 184f25d..4e49db0 100644 --- a/.aliases +++ b/.aliases @@ -66,8 +66,8 @@ alias j='jobs -l' # grep alias grep='grep --color=auto' -alias egrep='egrep --color=auto' -alias fgrep='fgrep --color=auto' +alias egrep='grep -E --color=auto' +alias fgrep='grep -F --color=auto' # Quick HTTP server alias serve='ruby -run -e httpd . -p 8080' From a281f8c8633c5658a9fb0ce74057e9997363f512 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 29 Jul 2026 19:37:02 +0000 Subject: [PATCH 06/11] feat(bash): use bat for syntax-highlighted man pages when available --- .profile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.profile b/.profile index 1152f05..017dc4c 100644 --- a/.profile +++ b/.profile @@ -57,7 +57,13 @@ fi export MANPATH="$HOME/.homebrew/share/man${MANPATH+:$MANPATH}:" # Don't clear the screen after quitting a manual page -export MANPAGER='less -X' +# Use bat for syntax-highlighted man pages when available, otherwise fall back +if command -v bat >/dev/null 2>&1; then + export MANPAGER="sh -c 'col -bx | bat -l man -p'" + export MANROFFOPT='-c' +else + export MANPAGER='less -X' +fi # color scheme # Keep the terminal's own TERM value (e.g. `xterm-ghostty`) when its terminfo From 69786318b076fc1f848a4b7488c2c3cb09882cfc Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 29 Jul 2026 19:37:28 +0000 Subject: [PATCH 07/11] feat(bash): add gh, kubectl and terraform completions to completions.bash --- .aliases | 1 - .config/bash/completions.bash | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/.aliases b/.aliases index 4e49db0..a19d233 100644 --- a/.aliases +++ b/.aliases @@ -192,7 +192,6 @@ fi # kubectl if command -v kubectl &>/dev/null; then alias k=kubectl - complete -F __start_kubectl k alias netshoot='kubectl run netshoot-$(date +%s) --rm -i --tty --image nicolaka/netshoot -- /bin/bash' fi diff --git a/.config/bash/completions.bash b/.config/bash/completions.bash index ab2e593..cad3532 100644 --- a/.config/bash/completions.bash +++ b/.config/bash/completions.bash @@ -27,3 +27,20 @@ if [[ -n "${HOMEBREW_PREFIX}" ]]; then unset _completion fi fi + +# gh CLI completions (includes gh copilot) +if command -v gh &>/dev/null; then + eval "$(gh completion -s bash)" +fi + +# kubectl completions (also covers the k alias defined in .aliases) +if command -v kubectl &>/dev/null; then + # shellcheck source=/dev/null + source <(kubectl completion bash) + complete -o default -F __start_kubectl k +fi + +# terraform completions +if command -v terraform &>/dev/null; then + complete -C terraform terraform +fi From 073e57586eef9ca88efd5fed87b093d348e719df Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 29 Jul 2026 19:37:37 +0000 Subject: [PATCH 08/11] feat(bash): add erasedups to HISTCONTROL to deduplicate shell history --- .profile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.profile b/.profile index 017dc4c..4a9bd43 100644 --- a/.profile +++ b/.profile @@ -33,7 +33,7 @@ fi export HISTFILE="${HOME}/.bash_history" export HISTSIZE=32768 export HISTFILESIZE=$HISTSIZE -export HISTCONTROL='ignoreboth' +export HISTCONTROL='ignoreboth:erasedups' export HISTIGNORE='ls:cd:cd -:pwd:exit:date:*--help:vault*:*VAULT_TOKEN*:*NOMAD_TOKEN*:*CONSUL_HTTP_TOKEN*' export HISTTIMEFORMAT='%h/%d -- %H:%M:%S ' From 02e94adf130d08fc7f07ef416327d2dbb6992580 Mon Sep 17 00:00:00 2001 From: Benjamin Dos Santos Date: Wed, 29 Jul 2026 21:54:50 +0200 Subject: [PATCH 09/11] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- .config/bash/completions.bash | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.config/bash/completions.bash b/.config/bash/completions.bash index cad3532..a2d9037 100644 --- a/.config/bash/completions.bash +++ b/.config/bash/completions.bash @@ -35,8 +35,10 @@ fi # kubectl completions (also covers the k alias defined in .aliases) if command -v kubectl &>/dev/null; then - # shellcheck source=/dev/null - source <(kubectl completion bash) + if ! declare -F __start_kubectl &>/dev/null; then + # shellcheck source=/dev/null + source <(kubectl completion bash) + fi complete -o default -F __start_kubectl k fi From c446e821e94ef8463877a797d73cb186e0313491 Mon Sep 17 00:00:00 2001 From: Benjamin Dos Santos Date: Wed, 29 Jul 2026 21:55:13 +0200 Subject: [PATCH 10/11] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- .config/bash/completions.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/bash/completions.bash b/.config/bash/completions.bash index a2d9037..4946241 100644 --- a/.config/bash/completions.bash +++ b/.config/bash/completions.bash @@ -29,7 +29,7 @@ if [[ -n "${HOMEBREW_PREFIX}" ]]; then fi # gh CLI completions (includes gh copilot) -if command -v gh &>/dev/null; then +if command -v gh &>/dev/null && ! complete -p gh &>/dev/null; then eval "$(gh completion -s bash)" fi From 8e6e5f9a5cdc19d4302f41ebf559a1138352378e Mon Sep 17 00:00:00 2001 From: Benjamin Dos Santos Date: Wed, 29 Jul 2026 22:14:01 +0200 Subject: [PATCH 11/11] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- .aliases | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.aliases b/.aliases index a19d233..622cfe0 100644 --- a/.aliases +++ b/.aliases @@ -45,7 +45,24 @@ alias glgcm='git log --before=$(date -d"+ 1 month" "+%Y-%m-01") --after=$(date " alias glgt='git log --since="yesterday" --author="$(git config user.name)" --pretty=format:"%cd - %h - %s" \ --date=short --no-merges' alias reflog='git reflog --pretty=raw | tig --pretty=raw' -alias merged='git branch --merged "$(git symbolic-ref --short refs/remotes/origin/HEAD 2>/dev/null | sed "s|origin/||")" | grep -v "^\*\|master\|main" | xargs -n 1 git branch -d && git fetch --prune' +merged() { + local base_ref + + base_ref=$(git symbolic-ref --quiet --short refs/remotes/origin/HEAD 2>/dev/null || + { git show-ref --verify --quiet refs/remotes/origin/main && printf '%s\n' origin/main; } || + { git show-ref --verify --quiet refs/remotes/origin/master && printf '%s\n' origin/master; }) + + if [[ -z "$base_ref" ]]; then + echo "merged: unable to determine default branch (origin/HEAD not set)" >&2 + return 1 + fi + + git branch --merged "$base_ref" | + grep -vE '^\*|^[[:space:]]*(main|master)$' | + while read -r b; do git branch -d "$b"; done + + git fetch --prune +} alias gsw='git switch' alias gswc='git switch -c' alias grs='git restore'