Commit b601579c authored by Mark OLESEN's avatar Mark OLESEN
Browse files

CONFIG: cleanup bash completions in unset

parent 0b1221c2
......@@ -97,6 +97,7 @@ done
cat << HEADER > $outFile
#----------------------------------*-sh-*--------------------------------------
# Bash completions for OpenFOAM applications
# Formatted as "complete ... -F _of_APPNAME APPNAME
unset -f _of_filter_opts 2>/dev/null
_of_filter_opts()
......
#----------------------------------*-sh-*--------------------------------------
# Bash completions for OpenFOAM applications
# Formatted as "complete ... -F _of_APPNAME APPNAME
unset -f _of_filter_opts 2>/dev/null
_of_filter_opts()
......
......@@ -181,6 +181,17 @@ unset -f wmRefresh 2>/dev/null
unset -f foamVersion 2>/dev/null
unset -f foamPV 2>/dev/null
# Cleanup bash completions, which look like this:
# "complete ... -F _of_APPNAME APPNAME
# For economy, obtain list first but also add in 'filter_opts' helper
foamClean="$(complete 2>/dev/null | sed -n -e 's/complete.*-F _of_.* \(..*\)$/\1/p')"
for cleaned in $foamClean filter_opts
do
unset -f _of_$cleaned 2>/dev/null
complete -r $cleaned 2>/dev/null
done
#------------------------------------------------------------------------------
# Intermediate variables (do as last for a clean exit code)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment