- commit
- 323554b
- parent
- 0f007b8
- author
- Eric Bower
- date
- 2026-03-08 23:22:56 -0400 EDT
feat(kak): user mode + t to copy filename to clipboard
1 files changed,
+11,
-1
+11,
-1
1@@ -23,7 +23,17 @@ define-command copy-to-osc %{
2 echo "Copied selections to OSC52 clipboard"
3 }
4
5-map global user y ':copy-to-osc<ret>' -docstring 'Copy to OSC52 clipboard'
6+map global user y ':copy-to-osc<ret>' -docstring 'Copy selection to OSC52 clipboard'
7+
8+define-command copy-filename-to-osc %{
9+ nop %sh{
10+ encoded=$(printf "%s" "$kak_buffile" | sed "s|^$(pwd)/||" | base64 | tr -d '\n')
11+ printf "\e]52;;%s\e\\" "$encoded" >/dev/tty
12+ }
13+ echo "Copied selections to OSC52 clipboard"
14+}
15+
16+map global user t ':copy-filename-to-osc<ret>' -docstring 'Copy filename to OSC52 clipboard'
17
18 define-command copy-github-permalink %{
19 evaluate-commands %sh{