Compare commits
86
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2e9e3a68b9 | ||
|
|
5c9a4802cb | ||
|
|
b4d0925afc | ||
|
|
c2fbd61445 | ||
|
|
f7627194db | ||
|
|
e04bcc547b | ||
|
|
f71b17e5ff | ||
|
|
9db303ec84 | ||
|
|
97923e802e | ||
|
|
34b914314c | ||
|
|
71a88388f8 | ||
|
|
cf80d4a447 | ||
|
|
fe65a36685 | ||
|
|
29e48a870f | ||
|
|
4c6b31041a | ||
|
|
8505ed15b8 | ||
|
|
ee73f0ae57 | ||
|
|
c143c1e459 | ||
|
|
28d0942bb9 | ||
|
|
d84b40efb8 | ||
|
|
7d4d36520b | ||
|
|
75b1b57727 | ||
|
|
85679ad72e | ||
|
|
b7a4fa9001 | ||
|
|
b09c0d2b7b | ||
|
|
10258de0ab | ||
|
|
4c5371a8c2 | ||
|
|
79d492df92 | ||
|
|
361fa87e99 | ||
|
|
7e0a278f49 | ||
|
|
09c4a473bd | ||
|
|
cbe60343ad | ||
|
|
2ba08d2efb | ||
|
|
009bb52681 | ||
|
|
387a6273a2 | ||
|
|
36ec95006e | ||
|
|
db55b56b85 | ||
|
|
5c7fbbd20f | ||
|
|
23643a0850 | ||
|
|
4c18b9aaa2 | ||
|
|
9bc4faf1d3 | ||
|
|
9f0fedd00d | ||
|
|
f61de6afa2 | ||
|
|
f4a32f1a69 | ||
|
|
f6b76ee9d1 | ||
|
|
d5c15d2302 | ||
|
|
afbe10737e | ||
|
|
36ceabb857 | ||
|
|
1f42f0e909 | ||
|
|
cfcc2bd943 | ||
|
|
ef429f5e5e | ||
|
|
741d96cdd4 | ||
|
|
c14fe5451f | ||
|
|
1d6d53e580 | ||
|
|
8e1877f9e8 | ||
|
|
6565a041e1 | ||
|
|
4385fa7c01 | ||
|
|
d5b8675fef | ||
|
|
247417af95 | ||
|
|
6d2071b1ea | ||
|
|
bd497a668d | ||
|
|
e931cb3c81 | ||
|
|
e332049a0d | ||
|
|
e68ccd8bc7 | ||
|
|
e80f4e87e7 | ||
|
|
d682e91d6d | ||
|
|
9455e8c6a9 | ||
|
|
c98ea52dbb | ||
|
|
a2a8cd16cb | ||
|
|
912f5aa0b5 | ||
|
|
4ed509fee6 | ||
|
|
7b33bf13f9 | ||
|
|
4bfa9995cd | ||
|
|
81202b5968 | ||
|
|
67d46f99c7 | ||
|
|
8b29c959fb | ||
|
|
710b0f9cdf | ||
|
|
ccfa18b331 | ||
|
|
d60bc2772f | ||
|
|
dfb0c08a0f | ||
|
|
b7886df942 | ||
|
|
330e88fbf3 | ||
|
|
914afec926 | ||
|
|
59d618b9f2 | ||
|
|
9733251bfc | ||
|
|
a9da299120 |
@@ -133,6 +133,59 @@ if [ -f "$HOME/.private_functions" ] && [ -r "$HOME/.private_functions" ]; then
|
|||||||
. "$HOME/.private_functions"
|
. "$HOME/.private_functions"
|
||||||
fi
|
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
|
# Preserve the usefulness of set -x by attempting to hide everything that
|
||||||
# happens in prompt_command
|
# happens in prompt_command
|
||||||
preserve_xtrace() {
|
preserve_xtrace() {
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ set -ex
|
|||||||
echo "PWD: $PWD"
|
echo "PWD: $PWD"
|
||||||
# Coder dotfiles (and most other ways of doing this) will not do a recursive clone, so do that in install script.
|
# 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
|
git submodule init && git submodule update
|
||||||
|
|
||||||
# Match case insensitively to make things easier for this part
|
# Match case insensitively to make things easier for this part
|
||||||
shopt -s nocasematch
|
shopt -s nocasematch
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user