Compare commits
89
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dfb9bf97e8 | ||
|
|
185824f6b8 | ||
|
|
16fdb25994 | ||
|
|
f79760f63e | ||
|
|
a07797c281 | ||
|
|
d0a7049bd8 | ||
|
|
b0e5c8e511 | ||
|
|
957de95e36 | ||
|
|
7a243ee185 | ||
|
|
e32ed8a7b7 | ||
|
|
1481fcc948 | ||
|
|
4afcb4523a | ||
|
|
db92ba133b | ||
|
|
0a7f1e193a | ||
|
|
edf8584f2a | ||
|
|
30ff982bff | ||
|
|
da4d9dc4ce | ||
|
|
37d71e1e43 | ||
|
|
7f0fd90dcc | ||
|
|
33be0bbd0a | ||
|
|
630160e1e9 | ||
|
|
27d202b0c2 | ||
|
|
4353a79f16 | ||
|
|
5ba18a9a7f | ||
|
|
157cb56eea | ||
|
|
6d2ebcb505 | ||
|
|
b3cecbaf22 | ||
|
|
f72d1050d3 | ||
|
|
c2e40ce9df | ||
|
|
6c09b2c11b | ||
|
|
8ff319f8de | ||
|
|
561297d305 | ||
|
|
7fbe76430d | ||
|
|
ed643a06f9 | ||
|
|
c460081637 | ||
|
|
2f971627bd | ||
|
|
55141b696b | ||
|
|
bee634eb79 | ||
|
|
bc63202425 | ||
|
|
119c751ea3 | ||
|
|
722352e607 | ||
|
|
e1d39feb7d | ||
|
|
f64da797ce | ||
|
|
ec19718182 | ||
|
|
6e88e2b333 | ||
|
|
4c312cfa58 | ||
|
|
11e8bf4bec | ||
|
|
a16b49a394 | ||
|
|
829e53d3cc | ||
|
|
e02cdd0b66 | ||
|
|
c2ebab9a41 | ||
|
|
5426e96bed | ||
|
|
51b8138cf3 | ||
|
|
790c132e07 | ||
|
|
008d3720ff | ||
|
|
85cee95c2e | ||
|
|
7360e32a08 | ||
|
|
c2286bb299 | ||
|
|
4c48565a8f | ||
|
|
edd3b72430 | ||
|
|
772da66b96 | ||
|
|
ac168d66d7 | ||
|
|
8937b9f566 | ||
|
|
c73a495540 | ||
|
|
406c50b4a5 | ||
|
|
4360067486 | ||
|
|
b156901695 | ||
|
|
bc00f7a310 | ||
|
|
16545b322f | ||
|
|
dafc207f96 | ||
|
|
f81ee2834a | ||
|
|
b7ce819dba | ||
|
|
f7b5147450 | ||
|
|
6246e75d81 | ||
|
|
d901efe31a | ||
|
|
e15f254143 | ||
|
|
fa7af5ee1f | ||
|
|
819c41de45 | ||
|
|
c97ef61d30 | ||
|
|
0d5d35d5e1 | ||
|
|
8c379c558a | ||
|
|
8ce45fc87c | ||
|
|
ed9e0d4419 | ||
|
|
dd35fe3b20 | ||
|
|
c26f6a6bf5 | ||
|
|
08713c254f | ||
|
|
2d14e91f81 | ||
|
|
8dda8c7fbc | ||
|
|
7d67ff0662 |
@@ -133,59 +133,6 @@ if [ -f "$HOME/.private_functions" ] && [ -r "$HOME/.private_functions" ]; then
|
||||
. "$HOME/.private_functions"
|
||||
fi
|
||||
|
||||
source_completions() {
|
||||
# Source completions if they are available
|
||||
completion_dirs=(
|
||||
"/usr/share/bash-completion/completions"
|
||||
"/etc/bash_completion.d"
|
||||
)
|
||||
cache_dir="${XDG_CACHE_HOME}/bash-completion-sourcing"
|
||||
|
||||
if [ "${BUILD_CACHE}" ]; then
|
||||
mkdir -p "${cache_dir}"
|
||||
fi
|
||||
|
||||
# Base completion sourcing, later completions will fail without this
|
||||
if [ -r "/usr/share/bash-completion/bash_completion" ]; then
|
||||
. "/usr/share/bash-completion/bash_completion"
|
||||
elif [ -r "/etc/bash_completion" ]; then
|
||||
. "/etc/bash_completion"
|
||||
fi
|
||||
|
||||
# Completions from packages
|
||||
export TIMEFORMAT="%R"
|
||||
for completion_dir in "${completion_dirs[@]}"; do
|
||||
if [ -d "${completion_dir}" ] && [ -r "${completion_dir}" ]; then
|
||||
for completion_file in "${completion_dir}"/*; do
|
||||
if [ "$BUILD_CACHE" ]; then
|
||||
echo "Sourcing ${completion_file}"
|
||||
. "${completion_file}"
|
||||
timeavg=$(time (. "${completion_file}") 2>&1 1>/dev/null)
|
||||
timeavg=$(echo $timeavg | cut -d '.' -f 2)
|
||||
if [ "${timeavg}" -gt 100 ]; then
|
||||
echo "This ones slow, adding to cache"
|
||||
echo "${timeavg}" > "${cache_dir}/$(basename ${completion_file})"
|
||||
elif [ "${timeavg}" -gt 10 ]; then
|
||||
echo "This ones a little slow"
|
||||
echo "${timeavg}"
|
||||
fi
|
||||
else
|
||||
if ! [ -e "${cache_dir}/$(basename ${completion_file})" ]; then
|
||||
. "${completion_file}"
|
||||
else
|
||||
:
|
||||
fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
done
|
||||
unset TIMEFORMAT
|
||||
}
|
||||
|
||||
if [ "$BASH_COMPLETION_ENABLED" ]; then
|
||||
source_completions
|
||||
fi
|
||||
|
||||
# Preserve the usefulness of set -x by attempting to hide everything that
|
||||
# happens in prompt_command
|
||||
preserve_xtrace() {
|
||||
|
||||
@@ -6,7 +6,6 @@ set -ex
|
||||
echo "PWD: $PWD"
|
||||
# Coder dotfiles (and most other ways of doing this) will not do a recursive clone, so do that in install script.
|
||||
git submodule init && git submodule update
|
||||
|
||||
# Match case insensitively to make things easier for this part
|
||||
shopt -s nocasematch
|
||||
|
||||
|
||||
Reference in New Issue
Block a user