Skip to content

Commit

Permalink
shell completion
Browse files Browse the repository at this point in the history
  • Loading branch information
joeyagreco committed Jan 21, 2025
1 parent f365cfb commit ddafc31
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
12 changes: 12 additions & 0 deletions .profile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# for shell completion
# https://docs.brew.sh/Shell-Completon
if type brew &>/dev/null; then
HOMEBREW_PREFIX="$(brew --prefix)"
if [[ -r "${HOMEBREW_PREFIX}/etc/profile.d/bash_completion.sh" ]]; then
source "${HOMEBREW_PREFIX}/etc/profile.d/bash_completion.sh"
else
for COMPLETION in "${HOMEBREW_PREFIX}/etc/bash_completion.d/"*; do
[[ -r "${COMPLETION}" ]] && source "${COMPLETION}"
done
fi
fi
4 changes: 2 additions & 2 deletions zsh/sourcing.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
setopt NO_CASE_GLOB
setopt EXTENDED_GLOB

# enable tab completion
autoload -U compinit promptinit
# # enable tab completion
# autoload -U compinit promptinit

# no duplicates in terminal command history
setopt HIST_IGNORE_DUPS
Expand Down

0 comments on commit ddafc31

Please sign in to comment.