Skip to content

Commit baccd7b

Browse files
committed
Remove code comments
1 parent a2d7f95 commit baccd7b

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

commands/system/delete-selected-files.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
# @raycast.author Vicent
1515
# @raycast.authorURL https://github.com/vigosan
1616

17-
# Get selected files from Finder using AppleScript (using newline as delimiter)
1817
selected_files=$(osascript <<'ENDAPPLE'
1918
tell application "Finder"
2019
set selectedItems to selection
@@ -33,19 +32,15 @@ end tell
3332
ENDAPPLE
3433
)
3534

36-
# Check if any files are selected
3735
if [ "$selected_files" = "NO_SELECTION" ]; then
3836
exit 1
3937
fi
4038

41-
# Convert the text list to array (AppleScript returns newline-separated paths)
4239
files=()
4340
while IFS= read -r line; do
4441
[[ -n "$line" ]] && files+=("$line")
4542
done <<< "$selected_files"
4643

47-
# Move each file to trash using AppleScript
4844
for file in "${files[@]}"; do
49-
# Move to trash using AppleScript (this is the native macOS way)
5045
osascript -e "tell application \"Finder\" to delete POSIX file \"$file\"" >/dev/null 2>&1
5146
done

0 commit comments

Comments
 (0)