Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env bash
- if [ $# -eq 0 ]
- then
- setopt localoptions noglobsubst noposixbuiltins pipefail 2> /dev/null
- find /c/z/snippets -printf "%f\n" | fzf | xargs /c/Program\ Files/AutoHotkey/AutoHotkey.exe /c/z/bin/s.ahk get $@
- else
- str2="${@:1}"
- str=$(echo "$str2" | sed 's/ /\-/g')
- /c/Program\ Files/AutoHotkey/AutoHotkey.exe /c/z/bin/s.ahk set $str.txt
- fi
- #=================#
- #s.ahk
- Gosub, %1%
- Return
- get:
- fileread, clipboard, C:\z\snippets\%2%
- ;minimizes terminal after setting file
- send {LAlt Down}{BackSpace}{LAlt Up}
- ;WinMinimize, A
- Return
- set:
- Fileappend, %clipboard%, C:\z\snippets\%2%
- ;minimizes terminal after setting file
- send {LAlt Down}{BackSpace}{LAlt Up}
- ;WinMinimize, A
- Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement