add logging for improperly prepared environments and better error handling.

pull/1642/head
cornfeedhobo 2020-07-12 16:20:50 -05:00
parent ec71fd57bc
commit 4734505af8
No known key found for this signature in database
GPG Key ID: 724357093F994B26
1 changed files with 9 additions and 1 deletions

View File

@ -1,5 +1,13 @@
# Ensure that we log to doctor so the user can address these issues
_is_function _init_completion ||
_log_error '_init_completion not found. Ensure bash-completion 2.0 or newer is installed and configured properly.'
_is_function _rl_enabled ||
_log_error '_rl_enabled not found. Ensure bash-completion 2.0 or newer is installed and configured properly.'
_pj() { _pj() {
[ -z "$PROJECT_PATHS" ] && return _is_function _init_completion || return
_is_function _rl_enabled || return
[ -n "$PROJECT_PATHS" ] || return
shift shift
[ "$1" == "open" ] && shift [ "$1" == "open" ] && shift