Skip to content

Commit dda9193

Browse files
committed
Do not prefix local varnames with underscores
1 parent c7b9867 commit dda9193

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

bash-preexec.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -153,15 +153,15 @@ __bp_precmd_invoke_cmd() {
153153
# "precmd_function". This function receives the arguments $1 and $2 for $? and
154154
# $_, respectively, that will be set for the precmd functions.
155155
bash_preexec_invoke_precmd_functions() {
156-
local __lastexit=$1 __lastarg=$2
156+
local lastexit=$1 lastarg=$2
157157
# Invoke every function defined in our function array.
158158
local precmd_function
159159
for precmd_function in "${precmd_functions[@]}"; do
160160

161161
# Only execute this function if it actually exists.
162162
# Test existence of functions with: declare -[Ff]
163163
if type -t "$precmd_function" 1>/dev/null; then
164-
__bp_set_ret_value "$__lastexit" "$__lastarg"
164+
__bp_set_ret_value "$lastexit" "$lastarg"
165165
# Quote our function invocation to prevent issues with IFS
166166
"$precmd_function"
167167
fi
@@ -274,7 +274,7 @@ __bp_preexec_invoke_exec() {
274274
# last non-zero exit status from the preexec functions to the variable
275275
# `preexec_ret_value`. If there is no error, preexec_ret_value is set to `0`.
276276
bash_preexec_invoke_preexec_functions() {
277-
local __lastexit=$1 __lastarg=$2 __this_command=$3
277+
local lastexit=$1 lastarg=$2 this_command=$3
278278
local preexec_function
279279
local preexec_function_ret_value
280280
preexec_ret_value=0
@@ -283,9 +283,9 @@ bash_preexec_invoke_preexec_functions() {
283283
# Only execute each function if it actually exists.
284284
# Test existence of function with: declare -[fF]
285285
if type -t "$preexec_function" 1>/dev/null; then
286-
__bp_set_ret_value "$__lastexit" "$__lastarg"
286+
__bp_set_ret_value "$lastexit" "$lastarg"
287287
# Quote our function invocation to prevent issues with IFS
288-
"$preexec_function" "$__this_command"
288+
"$preexec_function" "$this_command"
289289
preexec_function_ret_value="$?"
290290
if [[ "$preexec_function_ret_value" != 0 ]]; then
291291
preexec_ret_value="$preexec_function_ret_value"

0 commit comments

Comments
 (0)