summaryrefslogtreecommitdiff
path: root/rc/paths/commands/buffer
diff options
context:
space:
mode:
authorAlex Leferry 2 <alexherbo2@gmail.com>2020-08-13 18:21:25 +0200
committerAlex Leferry 2 <alexherbo2@gmail.com>2020-08-13 21:33:41 +0200
commit7fe2efc9bed557373e9c9cfe860d8e684dfd56bc (patch)
tree90e2a1c628b6ccc05c04415011255200c312f746 /rc/paths/commands/buffer
parentdefb50fc0ace0195d12e804993b1b74343024ada (diff)
Overhaul
Diffstat (limited to 'rc/paths/commands/buffer')
-rwxr-xr-xrc/paths/commands/buffer38
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 "$@"