update
This commit is contained in:
		
							
								
								
									
										2
									
								
								.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,2 @@
 | 
			
		||||
node_modules
 | 
			
		||||
.DS_Store
 | 
			
		||||
							
								
								
									
										18
									
								
								js/ls.ts
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										18
									
								
								js/ls.ts
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,18 @@
 | 
			
		||||
#!/usr/bin/env  /Users/xion/.nvm/versions/node/v24.5.0/bin/bun
 | 
			
		||||
 | 
			
		||||
// Required parameters:
 | 
			
		||||
// @raycast.schemaVersion 1
 | 
			
		||||
// @raycast.title ls
 | 
			
		||||
// @raycast.mode fullOutput
 | 
			
		||||
 | 
			
		||||
// Optional parameters:
 | 
			
		||||
// @raycast.icon 🤖
 | 
			
		||||
// @raycast.packageName @kevisual/raycast
 | 
			
		||||
 | 
			
		||||
// Documentation:
 | 
			
		||||
// @raycast.description ls
 | 
			
		||||
// @raycast.author abearxiong
 | 
			
		||||
// @raycast.authorURL https://raycast.com/abearxiong
 | 
			
		||||
 | 
			
		||||
console.log("Hello World!")
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										36
									
								
								sh/open-directory.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										36
									
								
								sh/open-directory.sh
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,36 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
 | 
			
		||||
# Required parameters:
 | 
			
		||||
# @raycast.schemaVersion 1
 | 
			
		||||
# @raycast.title open-directory
 | 
			
		||||
# @raycast.mode compact
 | 
			
		||||
 | 
			
		||||
# Optional parameters:
 | 
			
		||||
# @raycast.icon 🤖
 | 
			
		||||
# @raycast.packageName @kevisual/raycast
 | 
			
		||||
 | 
			
		||||
# Documentation:
 | 
			
		||||
# @raycast.description open
 | 
			
		||||
# @raycast.author abearxiong
 | 
			
		||||
# @raycast.authorURL https://raycast.com/abearxiong
 | 
			
		||||
 | 
			
		||||
# 获取访达当前窗口路径
 | 
			
		||||
finder_path=$(osascript <<EOF
 | 
			
		||||
tell application "Finder"
 | 
			
		||||
    try
 | 
			
		||||
        set thePath to POSIX path of (target of front window as alias)
 | 
			
		||||
        return thePath
 | 
			
		||||
    on error
 | 
			
		||||
        return ""
 | 
			
		||||
    end try
 | 
			
		||||
end tell
 | 
			
		||||
EOF
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
if [[ -z "$finder_path" ]]; then
 | 
			
		||||
  echo "没有检测到访达窗口"
 | 
			
		||||
  exit 1
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
# 用 VS Code 打开文件夹
 | 
			
		||||
open -a "Visual Studio Code" "$finder_path"
 | 
			
		||||
							
								
								
									
										41
									
								
								sh/open-file.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										41
									
								
								sh/open-file.sh
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,41 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
 | 
			
		||||
# Required parameters:
 | 
			
		||||
# @raycast.schemaVersion 1
 | 
			
		||||
# @raycast.title open-file
 | 
			
		||||
# @raycast.mode compact
 | 
			
		||||
 | 
			
		||||
# Optional parameters:
 | 
			
		||||
# @raycast.icon 🤖
 | 
			
		||||
# @raycast.packageName @kevisual/raycast
 | 
			
		||||
 | 
			
		||||
# Documentation:
 | 
			
		||||
# @raycast.description open
 | 
			
		||||
# @raycast.author abearxiong
 | 
			
		||||
# @raycast.authorURL https://raycast.com/abearxiong
 | 
			
		||||
 | 
			
		||||
# 获取访达选中的文件或文件夹路径
 | 
			
		||||
finder_path=$(osascript <<EOF
 | 
			
		||||
tell application "Finder"
 | 
			
		||||
    try
 | 
			
		||||
        set sel to selection
 | 
			
		||||
        if (count of sel) > 0 then
 | 
			
		||||
            set thePath to POSIX path of (item 1 of sel as alias)
 | 
			
		||||
            return thePath
 | 
			
		||||
        else
 | 
			
		||||
            set thePath to POSIX path of (target of front window as alias)
 | 
			
		||||
            return thePath
 | 
			
		||||
        end if
 | 
			
		||||
    on error
 | 
			
		||||
        return ""
 | 
			
		||||
    end try
 | 
			
		||||
end tell
 | 
			
		||||
EOF
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
if [[ -z "$finder_path" ]]; then
 | 
			
		||||
  echo "没有检测到访达窗口或选中文件"
 | 
			
		||||
  exit 1
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
open -a "Visual Studio Code" "$finder_path"
 | 
			
		||||
		Reference in New Issue
	
	Block a user