osx plugin: Updated description implementation, improved argument checking
parent
d4acc8148a
commit
39f54c2805
@ -1,12 +1,5 @@
|
||||
# cd to the current Finder directory
|
||||
|
||||
function cdf
|
||||
if count $argv >/dev/null
|
||||
switch $argv[1]
|
||||
case -d --description
|
||||
echo "cd to the current Finder directory"
|
||||
return 0
|
||||
end
|
||||
end
|
||||
function cdf -d "cd to the current Finder directory"
|
||||
cd (pfd)
|
||||
end
|
@ -1,12 +1,5 @@
|
||||
# Open a specified man page in Preview
|
||||
|
||||
function manp
|
||||
if count $argv >/dev/null
|
||||
switch $argv[1]
|
||||
case -d --description
|
||||
echo "Open a specified man page in Preview"
|
||||
return 0
|
||||
end
|
||||
end
|
||||
function manp -d "Open a specified man page in Preview"
|
||||
man -t $argv | open -f -a Preview
|
||||
end
|
@ -1,12 +1,5 @@
|
||||
# pushd to the current Finder directory
|
||||
|
||||
function pushdf
|
||||
if count $argv >/dev/null
|
||||
switch $argv[1]
|
||||
case -d --description
|
||||
echo "pushd to the current Finder directory"
|
||||
return 0
|
||||
end
|
||||
end
|
||||
function pushdf -d "pushd to the current Finder directory"
|
||||
pushd (pfd)
|
||||
end
|
@ -1,14 +1,9 @@
|
||||
# Quick Look a specified file
|
||||
|
||||
function ql
|
||||
if count $argv >/dev/null
|
||||
switch $argv[1]
|
||||
case -d --description
|
||||
echo "Quick Look a specified file"
|
||||
return 0
|
||||
end
|
||||
end
|
||||
if count $argv > 0
|
||||
function ql -d "Quick Look a specified file"
|
||||
if [ (count $argv) -gt 0 ]
|
||||
qlmanage >/dev/null ^/dev/null -p Applications/ &
|
||||
else
|
||||
echo "No file or folder as argument given"
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue