AutoYADM commit: 2025-05-21 20:58:39
This commit is contained in:
parent
fefa63d54b
commit
9b953c36e0
2 changed files with 22 additions and 4 deletions
|
@ -1,3 +1,21 @@
|
|||
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_inactive_fmt '%s %s'
|
||||
define-command -hidden bar-buflist %{
|
||||
evaluate-commands %sh{
|
||||
list=''
|
||||
|
@ -7,9 +25,9 @@ define-command -hidden bar-buflist %{
|
|||
fi
|
||||
index=$(($index + 1))
|
||||
if [ "$buf" = "$kak_bufname" ]; then
|
||||
cur=$(printf '[%s %s]' "$index" "$buf")
|
||||
cur=$(printf "$kak_opt_bar_active_fmt" "$index" "$buf")
|
||||
else
|
||||
cur=$(printf '%s %s' "$index" "$buf")
|
||||
cur=$(printf "$kak_opt_bar_inactive_fmt" "$index" "$buf")
|
||||
fi
|
||||
list="$list $cur"
|
||||
done <<<$(printf '%s\n' "$kak_buflist" | perl -nE 'say for /(\*[^*]+\*|\S+)/g')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue