declare-option -docstring %{ Format string passed to printf for the bufferlist. It should be set in the global scope. It receives two string arguments, where the first is the buffer index, and the second is the buffer name. Default: '[%s %s]' } str bar_active_fmt '[%s %s]' declare-option -docstring %{ Format string passed to printf for the bufferlist. It should be set in the global scope. It receives two string arguments, where the first is the buffer index, and the second is the buffer name. Default: '[%s %s]+' } str bar_active_modified_fmt '[%s %s]+' declare-option -docstring %{ Format string passed to printf for the bufferlist. It should be set in the global scope. It receives two string arguments, where the first is the buffer index, and the second is the buffer name. Default: '%s %s' } str bar_inactive_fmt '%s %s' declare-option -docstring %{ Format string passed to printf for the bufferlist. It should be set in the global scope. It receives two string arguments, where the first is the buffer index, and the second is the buffer name. Default: '%s %s+' } str bar_inactive_modified_fmt '%s %s+' define-command -hidden bar-buflist %{ evaluate-commands %sh{ #!/bin/sh list='' index=0 while read buf; do if [ "$buf" = '*debug*' ]; then continue fi index=$((index + 1)) if [ "$buf" = "$kak_bufname" ]; then if [ "$kak_modified" = "true" ]; then cur=$(printf "$kak_opt_bar_active_modified_fmt" "$index" "$buf") else cur=$(printf "$kak_opt_bar_active_fmt" "$index" "$buf") fi else cur=$(printf "$kak_opt_bar_inactive_fmt" "$index" "$buf") fi list="$list $cur" done <