Skip to content

feat(bash): shell/prompt modernization — 8 focused improvements - #155

Merged
bdossantos merged 11 commits into
masterfrom
copilot/modernize-bash-setup
Jul 29, 2026
Merged

bdossantos merged 11 commits into
masterfrom
copilot/modernize-bash-setup

Conversation

Copilot AI commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Eight targeted quality-of-life improvements to the bash/shell setup. Each change is its own commit for clean cherry-picking.

Shell options (options.bash)

  • globstar** recursive globbing
  • checkwinsize — keeps $LINES/$COLUMNS accurate after resize
  • autocd — navigate by typing a path directly
  • dirspell — spell-correction for directory tab-completion
  • histverify — shows !! expansion in readline buffer before executing

Readline (.inputrc)

Added visual completion improvements: colored-stats, colored-completion-prefix, mark-symlinked-directories, visible-stats, menu-complete-display-prefix, page-completions off

Aliases (.aliases)

  • merged: replaced hardcoded master with dynamic default branch via git symbolic-ref
  • egrep/fgrep: replaced deprecated binaries with grep -E/grep -F
  • kubectl k alias: removed ad-hoc complete -F __start_kubectl k — now lives in completions.bash

Environment (.profile)

  • HISTCONTROL: added erasedups to remove older duplicate entries on flush
  • MANPAGER: uses bat -l man -p when available for syntax-highlighted man pages; falls back to less -X
  • Fixed stale comment referencing ag instead of rg

Completions (completions.bash)

Added proper completions for gh (covers gh copilot), kubectl (with k alias binding), and terraform:

if command -v gh &>/dev/null; then
  eval "$(gh completion -s bash)"
fi

if command -v kubectl &>/dev/null; then
  source <(kubectl completion bash)
  complete -o default -F __start_kubectl k
fi

if command -v terraform &>/dev/null; then
  complete -C terraform terraform
fi

@bdossantos
bdossantos marked this pull request as ready for review July 29, 2026 19:40
Copilot AI review requested due to automatic review settings July 29, 2026 19:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Not ready to approve

The updated merged alias can break when origin/HEAD is unset, and the new completions logic runs expensive generators on every shell startup without guards.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.

Pull request overview

This PR modernizes the Bash prompt/shell experience in this dotfiles repo with a set of small, focused ergonomics improvements across environment defaults, Readline UI, shell options, aliases, and tab completions.

Changes:

  • Improves interactive shell behavior via new Bash shopt options and enhanced Readline completion visuals.
  • Updates environment defaults (history behavior, MANPAGER using bat when available, and a corrected fzf comment).
  • Refines git/grep/kubectl aliases and adds CLI completions for gh, kubectl (k), and terraform.
File summaries
File Description
.profile Updates history control, adds bat-based MANPAGER fallback logic, and fixes an fzf comment.
.inputrc Adds Readline visual completion settings.
.config/bash/options.bash Enables additional interactive Bash shell options (globstar, checkwinsize, autocd, dirspell, histverify).
.config/bash/completions.bash Adds gh, kubectl (k), and terraform completions.
.aliases Modernizes merged, replaces deprecated egrep/fgrep, and moves k completion wiring out of aliases.
Review details
  • Files reviewed: 5/5 changed files
  • Comments generated: 3
  • Review effort level: Low

We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.

Comment thread .aliases Outdated
Comment thread .config/bash/completions.bash
Comment thread .config/bash/completions.bash
bdossantos and others added 3 commits July 29, 2026 21:54
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@bdossantos
bdossantos merged commit 738c662 into master Jul 29, 2026
1 check passed
@bdossantos
bdossantos deleted the copilot/modernize-bash-setup branch July 29, 2026 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants