mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-08 04:34:00 +02:00
Merge a7b2b2d371 into 5667161d49
This commit is contained in:
commit
c34d2a8642
1 changed files with 34 additions and 0 deletions
|
|
@ -160,6 +160,40 @@ function pfs() {
|
|||
EOF
|
||||
}
|
||||
|
||||
function ppfd() {
|
||||
osascript 2>/dev/null <<EOF
|
||||
tell application "Path Finder"
|
||||
set the window_list to the finder windows
|
||||
set front_window to item 1 of window_list
|
||||
set front_path to the POSIX path of the target of the front finder window
|
||||
return front_path
|
||||
end tell
|
||||
EOF
|
||||
}
|
||||
|
||||
function ppfs() {
|
||||
osascript 2>/dev/null <<EOF
|
||||
set output to ""
|
||||
tell application "Path Finder"
|
||||
set pf_selection to selection
|
||||
if pf_selection is missing value then
|
||||
return
|
||||
end if
|
||||
set item_count to count pf_selection
|
||||
repeat with i from 1 to count pf_selection
|
||||
set pf_item to item i of pf_selection
|
||||
try
|
||||
set current_path to (POSIX path of pf_item)
|
||||
if i is less than item_count - 1 then set the_delimter to "
|
||||
"
|
||||
if i is item_count then set the_delimiter to ""
|
||||
set output to output & current_path & the_delimter
|
||||
end try
|
||||
end repeat
|
||||
end tell
|
||||
EOF
|
||||
}
|
||||
|
||||
function cdf() {
|
||||
cd "$(pfd)"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue