$COMP_LINE
–
Current Command Line
$COMP_LINE
is contains the current command line.
This variable is only available in functions and external commands invoked by the programmable completion.
Links
BashSupport Pro is a Bash IDE with support for $COMP_LINE – try it now!