Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test precmd_function without test compound command and command substitution #15

Merged
merged 1 commit into from
Nov 1, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions bash-preexec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,11 @@ __bp_precmd_invoke_cmd() {

# For every function defined in our function array. Invoke it.
local precmd_function
for precmd_function in ${precmd_functions[@]}; do
for precmd_function in "${precmd_functions[@]}"; do

# Only execute this function if it actually exists.
if [[ -n $(type -t $precmd_function) ]]; then
# Test existence of functions with: declare -[Ff]
if type -t "$precmd_function" 1>/dev/null; then
__bp_set_ret_value $ret_value
$precmd_function
fi
Expand Down