Skip to content

Commit

Permalink
Move completions to nix
Browse files Browse the repository at this point in the history
  • Loading branch information
giggio committed Jun 2, 2024
1 parent afdc588 commit f15b072
Show file tree
Hide file tree
Showing 21 changed files with 6 additions and 439 deletions.
2 changes: 1 addition & 1 deletion aliases/custom.aliases.bash
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ if hash istioctl 2>/dev/null; then
complete -F _complete_alias istio
fi
if hash terraform 2>/dev/null; then
alias tf=terraform # completions for alias are on completions file for Terraform
alias tf=terraform
fi
if hash pygmentize 2>/dev/null; then
alias ccat='pygmentize -g -O style=vs -f console16m'
Expand Down
17 changes: 5 additions & 12 deletions completions/000_completions.bash
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if ! shopt -oq posix; then
if [ -f /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion
elif [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
fi

function addCompletion {
if [ -f "$1" ]; then
# shellcheck source=/dev/null
Expand All @@ -17,7 +6,11 @@ function addCompletion {
}

updateCompletionsCommands=''
export COMPLETIONS_DIR=$HOME/.completions
if [ -v XDG_DATA_HOME ]; then
export COMPLETIONS_DIR=$XDG_DATA_HOME/bash-completion/completions/
else
export COMPLETIONS_DIR=$HOME/.local/share/bash-completion/completions/
fi
function updateCompletions {
echo Updating completions...
mkdir -p "$COMPLETIONS_DIR"
Expand Down
2 changes: 0 additions & 2 deletions completions/001_dotnet-suggest.bash

This file was deleted.

File renamed without changes.
10 changes: 0 additions & 10 deletions completions/002_dotnet.bash

This file was deleted.

File renamed without changes.
File renamed without changes.
2 changes: 0 additions & 2 deletions completions/003_helm.bash

This file was deleted.

Loading

0 comments on commit f15b072

Please sign in to comment.