添加 AGENTS.md 配置和 open-vscode-remote.sh 脚本
This commit is contained in:
7
AGENTS.md
Normal file
7
AGENTS.md
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
# raycast
|
||||||
|
|
||||||
|
对于 raycast 的使用,好用,但是有一些脚本还是需要自己写的。
|
||||||
|
|
||||||
|
- `./applescript` 是一些 applescript 脚本
|
||||||
|
- `./sh` 是一些 shell 脚本
|
||||||
|
- `./js` 是一些 javascript或者typescript 脚本
|
||||||
@@ -1,3 +1,7 @@
|
|||||||
# raycast
|
# raycast
|
||||||
|
|
||||||
对于 raycast 的使用,好用,但是有一些脚本还是需要自己写的。
|
对于 raycast 的使用,好用,但是有一些脚本还是需要自己写的。
|
||||||
|
|
||||||
|
- `./applescript` 是一些 applescript 脚本
|
||||||
|
- `./sh` 是一些 shell 脚本
|
||||||
|
- `./js` 是一些 javascript或者typescript 脚本
|
||||||
40
sh/open-vscode-remote.sh
Executable file
40
sh/open-vscode-remote.sh
Executable file
@@ -0,0 +1,40 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Required parameters:
|
||||||
|
# @raycast.schemaVersion 1
|
||||||
|
# @raycast.title Open VSCode Remote
|
||||||
|
# @raycast.mode silent
|
||||||
|
|
||||||
|
# Optional parameters:
|
||||||
|
# @raycast.icon 🖥️
|
||||||
|
# @raycast.packageName @kevisual/raycast
|
||||||
|
|
||||||
|
# Documentation:
|
||||||
|
# @raycast.description SSH to diana, fuzzy select a project with fzf, then open it in VSCode Remote
|
||||||
|
# @raycast.author abearxiong
|
||||||
|
# @raycast.authorURL https://raycast.com/abearxiong
|
||||||
|
|
||||||
|
FZF_BIN="/usr/local/bin/fzf"
|
||||||
|
|
||||||
|
CMD="ssh diana 'find /root/workspace/projects /root/workspace/docker -maxdepth 1 -mindepth 1 -type d 2>/dev/null' | $FZF_BIN --prompt='VSCode Remote > ' | xargs -I{} open 'vscode://vscode-remote/ssh-remote+diana{}'"
|
||||||
|
|
||||||
|
osascript <<OSASCRIPT
|
||||||
|
tell application "iTerm"
|
||||||
|
activate
|
||||||
|
try
|
||||||
|
set newWindow to (create window with default profile)
|
||||||
|
tell newWindow
|
||||||
|
tell current session
|
||||||
|
write text "$CMD"
|
||||||
|
end tell
|
||||||
|
end tell
|
||||||
|
on error
|
||||||
|
tell current window
|
||||||
|
create tab with default profile
|
||||||
|
tell current session
|
||||||
|
write text "$CMD"
|
||||||
|
end tell
|
||||||
|
end tell
|
||||||
|
end try
|
||||||
|
end tell
|
||||||
|
OSASCRIPT
|
||||||
Reference in New Issue
Block a user