The commands :sy
, :syn
, :synt
, and :synta
all run the :syntax
command. For a script I'd like to know which command the user typed on the commandline, for example:
get_full_command('syn') " returns 'syntax'
The closest I got is:
getcompletion('syn', 'command')
But this returns the tab completion:
['SyntaxName', 'syncbind', 'syntax', 'syntime']
Which isn't really useful here, since I still don't know which command :syn
runs.
How can I get the full command name from these shortcuts?