zsh: cleanup functions

pull/6/head
bretello 2022-01-24 09:58:26 +01:00
parent 476fd545b5
commit c6d444c709
Signed by: brethil
GPG Key ID: 876AAC6290170FE7
1 changed files with 23 additions and 44 deletions

View File

@ -166,14 +166,11 @@ function list_functions
}
###########################
## MAC SPECIFIC #
###########################
# MacOS only
if [[ "$(uname)" == "Darwin" ]]; then
## Create a RAM disk. Default size 1GB. If supplied, first argument defines the RAM disk size in GB
function ramdisk
{
## Create a RAM disk. Default size 1GB. If supplied, first argument defines the RAM disk size in GB
function ramdisk
{
if [[ -e $1 ]]; then
sizeingb=$1
else
@ -193,27 +190,9 @@ function ramdisk
echo "RAM Disk mounted: /tmp/$name"
echo "To eject (destroy) RAM disk, use:"
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
### end of mac-specific functions
pipupdate(){
set -x
if [[ "$1" == "user" ]]; then