From e7c3263f128e0291ef9803bb114fd4038ba0911e Mon Sep 17 00:00:00 2001 From: John D Pell Date: Fri, 17 Sep 2021 15:57:48 -0700 Subject: [PATCH] completion/system: load earlier than other completions I chose `325` so that it's still possible to deliberately place something *before* this component, if needed somehow. --- completion/available/system.completion.bash | 5 ++++- test/install/install.bats | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/completion/available/system.completion.bash b/completion/available/system.completion.bash index 113a93f5..aa9768ac 100644 --- a/completion/available/system.completion.bash +++ b/completion/available/system.completion.bash @@ -1,8 +1,11 @@ -#!/usr/bin/env bash +# shellcheck shell=bash # # Loads the system's Bash completion modules. # If Homebrew is installed (OS X), it's Bash completion modules are loaded. +# Load before other completions +# BASH_IT_LOAD_PRIORITY: 325 + if shopt -qo nounset then # Bash-completion is too large and complex to expect to handle unbound variables throughout the whole codebase. __bash_it_restore_nounset=true diff --git a/test/install/install.bats b/test/install/install.bats index 40f3162d..b8161896 100644 --- a/test/install/install.bats +++ b/test/install/install.bats @@ -32,7 +32,7 @@ function local_setup { assert_link_exist "$BASH_IT/enabled/250---base.plugin.bash" assert_link_exist "$BASH_IT/enabled/365---alias-completion.plugin.bash" assert_link_exist "$BASH_IT/enabled/350---bash-it.completion.bash" - assert_link_exist "$BASH_IT/enabled/350---system.completion.bash" + assert_link_exist "$BASH_IT/enabled/325---system.completion.bash" } @test "install: verify that a backup file is created" {