summaryrefslogtreecommitdiff
path: root/harpoon.kak
diff options
context:
space:
mode:
authorCaleb Heuer <ch@raiguard.me>2023-05-05 01:04:52 -0600
committerCaleb Heuer <ch@raiguard.me>2023-05-05 01:08:13 -0600
commit192ea27cfbb8ddea9c03d5a2317251f3106a13dc (patch)
tree33e36a50767c2a2a4b046eae93a5ec6338829561 /harpoon.kak
parent3bbb5901d20060986fd2233e7e99956f48f27140 (diff)
Minor cleanups
Diffstat (limited to 'harpoon.kak')
-rw-r--r--harpoon.kak7
1 files changed, 3 insertions, 4 deletions
diff --git a/harpoon.kak b/harpoon.kak
index 5bb2ff0..f8e7882 100644
--- a/harpoon.kak
+++ b/harpoon.kak
@@ -2,13 +2,12 @@ declare-option str-list harpoon_files
define-command harpoon-add -docstring "harpoon-add: Add the current file to the list of harpoons" %{
evaluate-commands %sh{
- bufname="$kak_bufname"
eval set -- "$kak_quoted_opt_harpoon_files"
index=0
while [ $# -gt 0 ]; do
index=$(($index + 1))
- if [ "$1" = "$bufname" ]; then
- echo "fail %{'$bufname' is already harpooned at index $index}"
+ if [ "$1" = "$kak_bufname" ]; then
+ echo "fail %{$kak_quoted_bufname is already harpooned at index $index}"
return
fi
shift
@@ -16,7 +15,7 @@ define-command harpoon-add -docstring "harpoon-add: Add the current file to the
index=$(($index + 1))
printf "%s\\n" "
set-option -add global harpoon_files $kak_quoted_bufname
- echo '$index: $bufname'
+ echo '$index: $kak_bufname'
"
}
}