Skip to content

Commit 2eeecfb

Browse files
author
Lars Gohlke
committed
adds colima completion
1 parent c8d5e3f commit 2eeecfb

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

tools/docker.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ __lazy_install docker-compose
77

88
function dc(){
99
if command podman-compose --help 2>&1 >/dev/null; then
10-
podman-compose $*
10+
podman-compose $*
1111
else
12-
docker compose $*
12+
docker compose $*
1313
fi
1414
}
1515

@@ -72,3 +72,11 @@ if [[ ${platform} == "linux" ]]; then
7272
systemctl --user start podman.socket >&2 2> /dev/null
7373
export DOCKER_HOST=unix://$XDG_RUNTIME_DIR/podman/podman.sock
7474
fi
75+
76+
if [[ -z $COMPLETION_INSTALLED_COLIMA ]]; then
77+
if command -v colima > /dev/null; then
78+
# shellcheck disable=SC1090
79+
source <(colima completion bash)
80+
export COMPLETION_INSTALLED_COLIMA=1
81+
fi
82+
fi

tools/git.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,11 @@ function git_clean_merged_branches() {
137137
export -f git_clean_merged_branches
138138

139139

140-
if [[ -z $GLAB_COMPLETION_INSTALLED ]]; then
140+
if [[ -z $COMPLETION_INSTALLED_GLAB ]]; then
141141
if command -v glab > /dev/null; then
142142
# see https://docs.gitlab.com/cli/completion/#bash
143143
# shellcheck disable=SC1090
144144
source <(glab completion -s bash)
145-
export GLAB_COMPLETION_INSTALLED=1
145+
export COMPLETION_INSTALLED_GLAB=1
146146
fi
147147
fi

0 commit comments

Comments
 (0)