diff options
| author | Zach DeCook <zachdecook@librem.one> | 2026-07-03 13:27:06 -0400 |
|---|---|---|
| committer | Zach DeCook <zachdecook@librem.one> | 2026-07-03 13:27:06 -0400 |
| commit | f919c973440869c727b64869078712bf2eb1ae5d (patch) | |
| tree | e2a55363fbcc02339bbc5b71727cfd752b3d0534 /.local | |
| parent | e8dab7e7b7de59d54ebd43ab22a3c561830f3921 (diff) | |
| download | dotfiles-f919c973440869c727b64869078712bf2eb1ae5d.tar.gz | |
use osc7 to indicate cwd mac-aarch64
Diffstat (limited to '.local')
| -rwxr-xr-x | .local/bin/osc7 | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/.local/bin/osc7 b/.local/bin/osc7 new file mode 100755 index 0000000..bdd034a --- /dev/null +++ b/.local/bin/osc7 @@ -0,0 +1,14 @@ +#!/bin/sh + tmp="$PWD" + enc="" + while [ -n "$tmp" ]; do + cut="${tmp#?}" + c="${tmp%"$cut"}" + case "$c" in + [-/:_.!\'\(\)~[:alnum:]] ) enc="$enc$c" ;; + * ) enc="$enc$(printf '%%%02X' """\"$c")" ;; + esac + tmp="$cut" + done + + printf "\033]7;file://%s%s\007" "$(hostname)" "$enc" |
