You should use -bar
as an argument to :command
in addition to -bang
, otherwise chaining commands and adding comments is not possible for user-defined commands.
You will have to use
command! -bar -bang BU BC<bang> | BI<bang>
in place of what you have currently because Bundle*
commands do not have -bar
argument.
There is another alternative: use execute
:
command! -bang BU execute 'BundleClean<bang>' | execute 'BundleInstall<bang>'
. Beware of using execute '…<some-arg>'
, it is not going to work properly for some arguments’ values. It works fine for both possible expansions of <bang>
.