diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2018-12-01 02:02:14 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2018-12-01 02:02:14 +1300 |
commit | 65e47bfe12f3fbc25da69e59c7af38e958c67688 (patch) | |
tree | 06b670f4bbbf3fcd1ef6e4a6f21299eca2e78412 | |
parent | Overhaul ssh_config hosts completion (diff) | |
download | dotfiles-65e47bfe12f3fbc25da69e59c7af38e958c67688.tar.gz dotfiles-65e47bfe12f3fbc25da69e59c7af38e958c67688.zip |
Use full `if` condition for _text_filename source
-rw-r--r-- | bash/bash_completion.d/awk.bash | 3 | ||||
-rw-r--r-- | bash/bash_completion.d/cat.bash | 3 | ||||
-rw-r--r-- | bash/bash_completion.d/ed.bash | 3 | ||||
-rw-r--r-- | bash/bash_completion.d/ex.bash | 3 | ||||
-rw-r--r-- | bash/bash_completion.d/grep.bash | 3 | ||||
-rw-r--r-- | bash/bash_completion.d/head.bash | 3 | ||||
-rw-r--r-- | bash/bash_completion.d/m4.bash | 3 | ||||
-rw-r--r-- | bash/bash_completion.d/mail.bash | 7 | ||||
-rw-r--r-- | bash/bash_completion.d/mutt.bash | 5 |
9 files changed, 20 insertions, 13 deletions
diff --git a/bash/bash_completion.d/awk.bash b/bash/bash_completion.d/awk.bash index 1e01381a..5f121d8a 100644 --- a/bash/bash_completion.d/awk.bash +++ b/bash/bash_completion.d/awk.bash @@ -1,4 +1,5 @@ # Completion for awk(1) with files that look editable -declare -F _text_filenames >/dev/null || +if ! declare -F _text_filenames >/dev/null ; then source "$HOME"/.bash_completion.d/_text_filenames.bash +fi complete -F _text_filenames -o filenames awk diff --git a/bash/bash_completion.d/cat.bash b/bash/bash_completion.d/cat.bash index 430cd58c..2da60ff0 100644 --- a/bash/bash_completion.d/cat.bash +++ b/bash/bash_completion.d/cat.bash @@ -1,4 +1,5 @@ # Completion for cat(1) with files that look editable -declare -F _text_filenames >/dev/null || +if ! declare -F _text_filenames >/dev/null ; then source "$HOME"/.bash_completion.d/_text_filenames.bash +fi complete -F _text_filenames -o filenames cat diff --git a/bash/bash_completion.d/ed.bash b/bash/bash_completion.d/ed.bash index c7fc6fde..b9651957 100644 --- a/bash/bash_completion.d/ed.bash +++ b/bash/bash_completion.d/ed.bash @@ -1,4 +1,5 @@ # Completion for ed(1) with files that look editable -declare -F _text_filenames >/dev/null || +if ! declare -F _text_filenames >/dev/null ; then source "$HOME"/.bash_completion.d/_text_filenames.bash +fi complete -F _text_filenames -o filenames ed diff --git a/bash/bash_completion.d/ex.bash b/bash/bash_completion.d/ex.bash index 6805b8b1..00875df5 100644 --- a/bash/bash_completion.d/ex.bash +++ b/bash/bash_completion.d/ex.bash @@ -1,4 +1,5 @@ # Completion for ex(1) with files that look editable -declare -F _text_filenames >/dev/null || +if ! declare -F _text_filenames >/dev/null ; then source "$HOME"/.bash_completion.d/_text_filenames.bash +fi complete -F _text_filenames -o filenames ex diff --git a/bash/bash_completion.d/grep.bash b/bash/bash_completion.d/grep.bash index 86c191cb..e9986b15 100644 --- a/bash/bash_completion.d/grep.bash +++ b/bash/bash_completion.d/grep.bash @@ -1,4 +1,5 @@ # Completion for grep(1) with files that look editable -declare -F _text_filenames >/dev/null || +if ! declare -F _text_filenames >/dev/null ; then source "$HOME"/.bash_completion.d/_text_filenames.bash +fi complete -F _text_filenames -o filenames grep diff --git a/bash/bash_completion.d/head.bash b/bash/bash_completion.d/head.bash index fa7cb878..0f4a7131 100644 --- a/bash/bash_completion.d/head.bash +++ b/bash/bash_completion.d/head.bash @@ -1,4 +1,5 @@ # Completion for head(1) with files that look editable -declare -F _text_filenames >/dev/null || +if ! declare -F _text_filenames >/dev/null ; then source "$HOME"/.bash_completion.d/_text_filenames.bash +fi complete -F _text_filenames -o filenames head diff --git a/bash/bash_completion.d/m4.bash b/bash/bash_completion.d/m4.bash index 5811fd5b..bb50f3b2 100644 --- a/bash/bash_completion.d/m4.bash +++ b/bash/bash_completion.d/m4.bash @@ -1,4 +1,5 @@ # Completion for m4(1) with files that look editable -declare -F _text_filenames >/dev/null || +if ! declare -F _text_filenames >/dev/null ; then source "$HOME"/.bash_completion.d/_text_filenames.bash +fi complete -F _text_filenames -o filenames m4 diff --git a/bash/bash_completion.d/mail.bash b/bash/bash_completion.d/mail.bash index 65c4ae80..5d1cdec0 100644 --- a/bash/bash_completion.d/mail.bash +++ b/bash/bash_completion.d/mail.bash @@ -1,6 +1,5 @@ # Completion for mail(1) with abook(1) email addresses -declare -F _abook_addresses >/dev/null || - source "$HOME"/.bash_completion.d/_abook_addresses.bash - -# bashdefault requires Bash >=3.0 +if ! declare -F _text_filenames >/dev/null ; then + source "$HOME"/.bash_completion.d/_text_filenames.bash +fi complete -F _abook_addresses -o bashdefault -o default mail diff --git a/bash/bash_completion.d/mutt.bash b/bash/bash_completion.d/mutt.bash index c7f02ac7..5fb13339 100644 --- a/bash/bash_completion.d/mutt.bash +++ b/bash/bash_completion.d/mutt.bash @@ -1,4 +1,5 @@ # Completion for mutt(1) with abook(1) email addresses -declare -F _abook_addresses >/dev/null || - source "$HOME"/.bash_completion.d/_abook_addresses.bash +if ! declare -F _text_filenames >/dev/null ; then + source "$HOME"/.bash_completion.d/_text_filenames.bash +fi complete -F _abook_addresses -o bashdefault -o default mutt |