I have created some bash completion functions that all appear to work in isolation but give me unexpected results when I attempt to tab complete with them.
Is it possible to connect bashdb, then attempt to tab complete something and step through to debug and determine what is going wrong?
Best Answer
set -x
If you
set -x
either in the interactive session or the autocomplete script itself, (nearly?) every command and its results will be printed out. This includes the work done inside the autocomplete script.This can then be quieted back down again with
set +x
.-from Bash manual #The Set Builtin