Commit 6b86c2d
Eric Bower
·
2026-09-09 10:35:47 -0400 EDT
parent 6aefa34
refactor(ctags): naming
9 files changed,
+21,
-3
| ... | ... | @@ -0,0 +1,18 @@ | |
| 1 | + | #!/usr/bin/env bash | |
| 2 | + | set -euo pipefail | |
| 3 | + | ||
| 4 | + | if ! command -v ctags >/dev/null 2>&1; then | |
| 5 | + | echo "error: ctags not found in PATH" >&2 | |
| 6 | + | exit 1 | |
| 7 | + | fi | |
| 8 | + | ||
| 9 | + | echo "Generating tags in $(pwd)..." | |
| 10 | + | ||
| 11 | + | if ctags -R --fields=+S -f .tags.tmp .; then | |
| 12 | + | mv .tags.tmp tags | |
| 13 | + | echo "Saved tags ($(du -h tags | cut -f1 | xargs))" | |
| 14 | + | else | |
| 15 | + | rm -f .tags.tmp | |
| 16 | + | echo "error: tags generation failed" >&2 | |
| 17 | + | exit 1 | |
| 18 | + | fi |
R bin/ftags =>
bin/fjump
+1,
-1
| ... | ... | @@ -18,7 +18,7 @@ else | |
| 18 | 18 | fi | |
| 19 | 19 | ||
| 20 | 20 | if [[ ${#tag_files[@]} -eq 0 ]]; then | |
| 21 | - | echo "ftags: no tags file found (try: ftags <tagfile>)" >&2 | |
| 21 | + | echo "fjump: no tags file found (try: fjump <tagfile>)" >&2 | |
| 22 | 22 | exit 1 | |
| 23 | 23 | fi | |
| 24 | 24 |
+2,
-2
| ... | ... | @@ -126,7 +126,7 @@ map global user s ': ctags-file-symbols<ret>' -docstring 'search symbols i | |
| 126 | 126 | define-command ctags-generate-deps -docstring "Generate .tags_deps for third-party dependencies" %{ | |
| 127 | 127 | echo -markup "{Information}generating dependency tags in background..." | |
| 128 | 128 | nop %sh{ ( | |
| 129 | - | if gen-deps-tags; then | |
| 129 | + | if ctags-deps; then | |
| 130 | 130 | msg="dependency tags generated" | |
| 131 | 131 | else | |
| 132 | 132 | msg="failed to generate dependency tags" |
| ... | ... | @@ -138,7 +138,7 @@ define-command ctags-generate-deps -docstring "Generate .tags_deps for third-par | |
| 138 | 138 | define-command ctags-file-symbols -docstring "Browse and jump to functions in current file" %{ | |
| 139 | 139 | require-module menu | |
| 140 | 140 | evaluate-commands %sh{ | |
| 141 | - | kak-file-symbols "$kak_buffile" | |
| 141 | + | ctags-file-symbols "$kak_buffile" | |
| 142 | 142 | } | |
| 143 | 143 | } | |
| 144 | 144 |