diff options
| author | Alex Leferry 2 <alexherbo2@gmail.com> | 2020-08-13 18:21:25 +0200 |
|---|---|---|
| committer | Alex Leferry 2 <alexherbo2@gmail.com> | 2020-08-13 21:33:41 +0200 |
| commit | 7fe2efc9bed557373e9c9cfe860d8e684dfd56bc (patch) | |
| tree | 90e2a1c628b6ccc05c04415011255200c312f746 /rc/paths/commands/buffer | |
| parent | defb50fc0ace0195d12e804993b1b74343024ada (diff) | |
Overhaul
Diffstat (limited to 'rc/paths/commands/buffer')
| -rwxr-xr-x | rc/paths/commands/buffer | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/rc/paths/commands/buffer b/rc/paths/commands/buffer deleted file mode 100755 index 46b594e..0000000 --- a/rc/paths/commands/buffer +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/sh - -# Open buffers. With no argument, list buffers instead. - -. "$KAKOUNE_PRELUDE" - -main() { - if test $# -eq 0; then - list - else - edit "$@" - # Try to attach a connect terminal command - attach - fi -} - -list() { - kak_quoted_buflist=$(get '%val{buflist}') - eval "set -- $kak_quoted_buflist" - printf '%s\n' "$@" -} - -edit() { - commands='' - for buffer do - kak_quoted_buffer=$(kak_escape "$buffer") - commands="buffer $kak_quoted_buffer; $commands" - done - # Attach to terminal. - # Ensure there is a terminal. - if test -t 1 -a "$KAKOUNE_CONNECT_ATTACH" = true; then - kak -c "$KAKOUNE_SESSION" -e "$commands" - else - send "$commands" - fi -} - -main "$@" |
