From 192ea27cfbb8ddea9c03d5a2317251f3106a13dc Mon Sep 17 00:00:00 2001 From: Caleb Heuer Date: Fri, 5 May 2023 01:04:52 -0600 Subject: Minor cleanups --- README.md | 2 +- harpoon.kak | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index afda0b6..921fdf9 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ If the default bindings do not work for you, here are the relevant commands to c - `harpoon-nav `: Navigate to the harpoon at `` - `harpoon-show-list`: View the harpoons list -## TODO +## Roadmap - Save line and column information - Persist harpoons per-session 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' " } } -- cgit v1.2.3