The shell builtin command return can be used to exit early from a file
sourced with . or source.

bash_completion could protect itself from being re-sourced by doing
type __reassemble_comp_words_by_ref 2>/dev/null && return
Or maybe
complete -p paste 2>/dev/null && return
So complete -r; source /usr/share/bash-completion/bash_completion would re-load.

 This still violates the expectation that users might have that if they
changed stuff in /etc/bash_completion.d, they could just re-source the
system bash_completion script.

 Maybe
complete -p paste 2>/dev/null && 
  echo "completions already loaded, complete -r before sourcing if you want 
them re-loaded" >&2 && 
  return

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/790043

Title:
  Bash-completion slows up the start of bash

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bash-completion/+bug/790043/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to