The only way to have something dynamic in the status line is to use %{ expr }
. However, because there is no ternary operator (cond ? then : else
), it's of not much use here.
You could of course use
${ system('my-script '.expand('%c:p')) }
but it will slow things down. Wrapping it using extcached()
might make things bearable performance-wise if you really want this:
${ extcached('link-tail', expand('%c:p'), system(expand('my-script %c:p'))) }