diff options
| -rw-r--r-- | README.md | 2 | ||||
| -rw-r--r-- | harpoon.kak | 7 |
2 files changed, 4 insertions, 5 deletions
@@ -33,7 +33,7 @@ If the default bindings do not work for you, here are the relevant commands to c - `harpoon-nav <index>`: Navigate to the harpoon at `<index>` - `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' " } } |
