diff options
| author | Caleb Heuer <ch@raiguard.me> | 2023-05-05 01:04:52 -0600 |
|---|---|---|
| committer | Caleb Heuer <ch@raiguard.me> | 2023-05-05 01:08:13 -0600 |
| commit | 192ea27cfbb8ddea9c03d5a2317251f3106a13dc (patch) | |
| tree | 33e36a50767c2a2a4b046eae93a5ec6338829561 | |
| parent | 3bbb5901d20060986fd2233e7e99956f48f27140 (diff) | |
Minor cleanups
| -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' " } } |
