mirror of
https://git.decapod.one/brethil/dotfiles
synced 2024-11-22 03:21:30 +01:00
zsh: cleanup functions
This commit is contained in:
parent
476fd545b5
commit
c6d444c709
|
@ -166,14 +166,11 @@ function list_functions
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
###########################
|
# MacOS only
|
||||||
## MAC SPECIFIC #
|
|
||||||
###########################
|
|
||||||
|
|
||||||
if [[ "$(uname)" == "Darwin" ]]; then
|
if [[ "$(uname)" == "Darwin" ]]; then
|
||||||
## Create a RAM disk. Default size 1GB. If supplied, first argument defines the RAM disk size in GB
|
## Create a RAM disk. Default size 1GB. If supplied, first argument defines the RAM disk size in GB
|
||||||
function ramdisk
|
function ramdisk
|
||||||
{
|
{
|
||||||
if [[ -e $1 ]]; then
|
if [[ -e $1 ]]; then
|
||||||
sizeingb=$1
|
sizeingb=$1
|
||||||
else
|
else
|
||||||
|
@ -193,27 +190,9 @@ function ramdisk
|
||||||
echo "RAM Disk mounted: /tmp/$name"
|
echo "RAM Disk mounted: /tmp/$name"
|
||||||
echo "To eject (destroy) RAM disk, use:"
|
echo "To eject (destroy) RAM disk, use:"
|
||||||
echo " $ diskutil eject $mydev"
|
echo " $ diskutil eject $mydev"
|
||||||
}
|
}
|
||||||
|
|
||||||
## Open a pdf version of the man in Preview
|
|
||||||
function man2pdf
|
|
||||||
{
|
|
||||||
man -t "$1" | open -f -a Preview
|
|
||||||
}
|
|
||||||
|
|
||||||
## Open Man in separate (different-looking) window
|
|
||||||
function nman
|
|
||||||
{
|
|
||||||
if [ $# -eq 1 ] ; then
|
|
||||||
open "x-man-page://$1"
|
|
||||||
elif [ $# -eq 2 ] ; then
|
|
||||||
open "x-man-page://$1/$2"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
### end of mac-specific functions
|
|
||||||
|
|
||||||
pipupdate(){
|
pipupdate(){
|
||||||
set -x
|
set -x
|
||||||
if [[ "$1" == "user" ]]; then
|
if [[ "$1" == "user" ]]; then
|
||||||
|
|
Loading…
Reference in New Issue
Block a user