code
stringlengths
1
1.96M
language
stringclasses
1 value
#!/bin/zsh -f # function my_prefs_edit # This function should be run to create a .zsh/my_edit_rc file in the user's home # directory. This allows the user of my edit and hydra functions to pick their # own default applications. # This function is called from edit or nonasciiedit or hydra; there is no # requirement ...
Shell
#!/bin/zsh -f # Activate the function keys. tab_number=1 print "Please wait ...." osascript <<-eof tell application "Finder" activate activate application "System Preferences" tell application "System Events" if (system attribute "sysv") is greater than or equal to 4144 then -- Mac...
Shell
#!/bin/zsh -f # shell script name cdright: cd to the directory displayed on the right panel of ForkLift version="0.0.1" # Please note that this is not flawless, as it takes awhile for the plist file to update. ############################################################################### # Created by on . ...
Shell
#!/bin/zsh -f # set -x # function/shell script "composer" for opening html files for editing # using Mozilla or Netscape composer # open Mozilla.app or Netscape.app in composer mode, optionally with # a given file name as an argument. Uses mozilla.app by default if both # it and netscape are present, unless -n fla...
Shell
#!/bin/zsh -f # pbcp: copy the output of a command to the clipboard and to stdout eval "$* | tee /dev/tty | pbcopy"
Shell
#!/bin/zsh -f # # Battery by Göran Larsson # # MacOS X/Darwin command line tool showing battery status. # # Version 1.0 2003-03-16 Initial release. # Version 1.1 2003-10-14 Changes to handle Panther. # Version 1.2 2004-11-16 Fix bug causing divide by zero. Output changes for long form. # Version 1.3 ...
Shell
#!/bin/zsh -f #---------------------------------------------------------- # guidirs_pashua # # Written by Wataru Kagawa (02/20/05) # wkagawa@jota.gsc.riken.go.jp # # A modified version of guidirs (by William Scott), which # is a gui version of the pushd command. # # This function executes the Pashua program and displ...
Shell
#!/bin/zsh -f # use mdfind the way you use locate to find a file mdfind "$@" | grep "$@"
Shell
#!/bin/zsh -f if [[ -z $prompt_text ]];then prompt_text=( Choose an item: ) fi # Thanks to Gary Kerbaugh for the next five lines list_items="" # for argument in "$@"; do # list_items=${list_items}\"${argument}'", ' # done # list_items=${list_items%, } # Thanks to Daniel...
Shell
#!/bin/zsh -f # setopt sh_word_split # wrapper function fink to accompany completion function _fink # generates completion cache # displays "fink [first argument]" in tab or title bar while running # leaves functionality of the command fink otherwise unchanged # Author: W G Scott # Nov 28, 2004 # Last rev...
Shell
#!/bin/zsh -f thePath="$( osascript<<END try tell application "Finder" to set the source_folder to (folder of the front window) as alias on error -- no open folder windows set the source_folder to path to desktop folder as alias end try set thePath to (POSIX path of the source_folder as string) set result to thePat...
Shell
#!/bin/zsh -ef if [[ -d $HOME/.a2ps ]];then command mkdir -p $HOME/.a2ps fi if [[ -f $HOME/.a2ps/a2psrc ]]; then mv $HOME/.a2ps/a2psrc $HOME/.a2ps/a2psrc_$$ fi ln -s $ZDOT/zshrc.d/local-functions/etc/a2psrc $HOME/.a2ps/a2psrc command a2ps -r --columns=2 "$@" if [[ -f $HOME/.a2ps/a2psrc_$$ ]];then rm $...
Shell
#!/bin/zsh -f # Put full path in finder version="0.0.2" ############################################################################### # Created by on 2007-11-17. # Copyright (c) 2007. All rights reserved. # This program is free software; you can redistribute it and/or modify # it under the terms of t...
Shell
#!/bin/zsh -f function airport { /System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport "$@" }
Shell
#!/bin/zsh -f #------------------------------------------------------------------------ # quit # # by Wataru Kagawa (05/17/05) # wkagawa@jota.gsc.riken.go.jp # # A function to quit Mac OS X applications. Native applications are # quitted using an osascript, and X11 applications are quitted by killing # its pid. # #...
Shell
#!/bin/zsh -f # set -x # Start a full-screen xwindowmanager session but in a nested window. ############################################################################### # Do some reality checks: if [[ ! -x $(which Xnest) && ! -x /usr/X11/bin/Xephyr ]];then print "Xnest and Xephyr do not appear to be on th...
Shell
#!/bin/zsh -f # spath, when issued from the command prompt in Terminal, iTerm, or xterm, will # copy the directory corresponding to the web page displayed in Safari into the # clip-board paste buffer and will assign the variable SPATH to that directory. # Put your top-level server directory here: if [[ -z $PUBLI...
Shell
#!/bin/zsh -f #set -x ############################################################################ function FinderSelector { osascript << eof1 try tell application "Finder" to set the source_folder to (folder of the front window) as alias on error...
Shell
#!/bin/zsh -f version="2.0.1" # The script must be run as an admin user # if [[ -z $(/usr/bin/id -p $USER | grep admin) ]];then print "You must be an administrative user with sudo privileges in order to run $0" fi # set -x # Obtained and modified from a bash shell script available at # http://www.osxfaq.com/tip...
Shell
#!/bin/zsh -f # short cut to zsh files function zshf { cd $ZDOT }
Shell
#!/bin/zsh -f # aeon: toggle AppleEvent logging on or off if [ -z "$AEDebug" ]; then export AEDebug=1 AEDebugSend=1 AEDebugReceives=1; else unset AEDebug AEDebugSend AEDebugReceives; fi
Shell
#!/bin/zsh -f # set -x # Edit function, version 2.0.1 # October 17, 2006 # Complete re-write of the cumbersome version 1.x.y # Revised July 9, 2007 to fix a major bug #------------------------------------------------------------------------------ # Find out what the user prefers to use for various editing tasks i...
Shell
#!/bin/zsh -f grep -iIrn "$1" "$(posd)"
Shell
#!/bin/zsh -f find "$(posd)" -name "*$1*";
Shell
#!/bin/zsh -f if [[ $1 == '-P' ]];then WhichPashua='use_external' print " Using the user-installed Pashua.app" else WhichPashua='use_internal' # Dockless version # print " Using internal Pashua framework in $ZDOT/zshrc.d/local-functions/etc" fi #----------------------------------------...
Shell
#!/bin/zsh -f # whichfunctions -a lists completions and functions # whichfunctions -f lists functions but not completions # whichfunctions -c lists only completion functions if [[ $1 == '-f' ]]; then function whichfunctions { command functions | command grep "()" | /usr/bin/awk '{print $1}' \ ...
Shell
#!/bin/zsh -f # Execute a command in the same directory but in a new tab if [[ $TERM_PROGRAM != iTerm.app ]]; then open -a Terminal return 0 fi # First, get the directory for the new tab ThisDirectory=$PWD if [[ $# == 0 ]]; then print "usage: $0 [commands]" return 1 fi osascript <<-eof tel...
Shell
#!/bin/zsh -f version="2.0.0" # The script must be run as an admin user # if [[ -z $(/usr/bin/id -p $USER | grep admin) ]];then print "You must be an administrative user with sudo privileges in order to run $0" fi # For 10.5: Eliminated niutil commands in favor of Directory Service # Obtained and modified from a...
Shell
#!/bin/zsh -f # This is a pre-command function that notifies the user when the command (provided as an argument) # completes. It attempts to use growlnotify if present, otherwise it prints a message. If the command # returns anything other than 0 (i.e., it fails), the growl window remains sticky. # In each case the ...
Shell
#!/bin/zsh -f # usage: gdirs [-fF] # gdirs -f cd's both terminal and finder to chosen directory # gdirs -F cd's only the Finder to the chosen directory # gdirs with no argument changes only the terminal directory CDD=OFF ; CDF=OFF if [[ $1 == '-f' ]];then CDD=ON elif [[ $1 == '-F' ]];then CDF=ON else CDD=OFF...
Shell
#!/bin/zsh -f osascript -e "tell app \"Finder\" to empty trash"
Shell
#!/bin/zsh -f version="2.0.0" # The script must be run as an admin user # if [[ -z $(/usr/bin/id -p $USER | grep admin) ]];then print "You must be an administrative user with sudo privileges in order to run $0" fi # For 10.5: Eliminated niutil commands in favor of Directory Service # Obtained and modified from a ...
Shell
#!/bin/zsh -f # function that greps all of the framework header files for numbers associated with error messages find {/System,}/Library/Frameworks -name "*.h" -exec grep $1 /dev/null "{}" \;;
Shell
#!/bin/zsh -f #----------------------------------------------- # sync_fink # # by Wataru Kagawa (05/17/05) # wkagawa@jota.gsc.riken.go.jp # # syncronize the /sw folder on a remote computer # with that of the host computer. # # USAGE: # sync_fink <remote name> #----------------------------------------------- functio...
Shell
#!/bin/zsh -f if [[ -z $1 ]]; then /System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend else USERID=`/usr/bin/id -u $1`; if [[ -z $USERID ]]; then return -1; fi /System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -switchToUserID $USERID...
Shell
#!/bin/zsh -f # Ben Holt # http://www.macosxhints.com/article.php?story=2007122622572152 # Modified for most recent powermate version. function find_version { if [[ -f /Library/PreferencePanes/PowerMate.prefPane/Contents/Info.plist ]];then version_num=$(grep "PowerMate version" /Library/PreferencePanes/Pow...
Shell
#!/bin/zsh -ef if [[ -d $HOME/.a2ps ]];then command mkdir -p $HOME/.a2ps fi if [[ -f $HOME/.a2ps/a2psrc ]]; then mv $HOME/.a2ps/a2psrc $HOME/.a2ps/a2psrc_$$ fi ln -s $ZDOT/zshrc.d/local-functions/etc/a2psrc $HOME/.a2ps/a2psrc command a2ps "$@" if [[ -f $HOME/.a2ps/a2psrc_$$ ]];then rm $HOME/.a2ps/a2psr...
Shell
#!/bin/zsh -fx # Function to permit the user to switch the prompt easily. # Find the possible options from the themes provided: prompt_theme_options=( $fpath/prompt_*(N:t) ) ################################################################################ # function ChoosePromptTheme allows ...
Shell
#!/bin/zsh -xf # Start a full-screen enlightenment session but in a nested window. ############################################################################### # Do some reality checks: # No point in using this unless we are on OS X: if [[ $(uname) != Darwin ]];then print "This only works for OS X. This does not...
Shell
#!/bin/zsh -f # fink_web opens up the fink package database website. If $1 is provided, # then the package database opens to the page for the named package if [[ -z $1 ]];then open http://pdb.finkproject.org/pdb/ elif [[ $1 == (-s|--search|-search) ]];then open http://pdb.finkproject.org/pdb/"search.php?summa...
Shell
#!/bin/zsh -f # Function to run a program in second X11 display # without disturbing the default 24-bit X11. # See also 8bitx # Created by William Scott on 2007-04-26. # Copyright (c) 2007. All rights reserved. version="0.0.1" # Check to make sure /usr/X11R6/bin/Xquartz is present if [[ ! -x /usr/X11/bin/Xq...
Shell
#!/bin/zsh -f # mybom: lsbom the listed package with the given arguments lsbom -p sfMUG /Library/Receipts/*"$1"*.pkg/Contents/Archive.bom;
Shell
#!/bin/zsh -f # function osa_display_dialog takes up to three arguments (button item options) # supplied after invoking the function. # Display times out according to the variable $timeout in seconds (defaults to 15 sec). if [[ -z $timeout ]];then timeout='15' fi # The variable $dialogue_text is ...
Shell
#!/bin/zsh -f # Function to renew a dynamically allocated IP address via BOOTP or DHCP. # Try en0 first, and then try en1 # Finally, test the IP address. sudo ipconfig set en0 BOOTP if [[ $? != 0 ]];then print "Try this on en1" sudo ipconfig set en1 BOOTP fi sudo ipconfig set en0 DHCP if [[ $? != 0 ]];then ...
Shell
#!/bin/zsh -f # shell script name acl_adduser # An acl nuclear option to give access to user $1 to the directory tree rooted at $2. version="0.0.1" ############################################################################### # Created by wgscott on 1 August 2009. # Copyright (c) . All rights reserved. #...
Shell
#!/bin/zsh -f # Function to run a program in an 8-bit (256 colors) X11 display # without disturbing the default 24-bit X11. # Created by William Scott on 2007-04-26. # Copyright (c) 2007. All rights reserved. version="0.0.1" # Check to make sure /usr/X11R6/bin/Xquartz is present if [[ ! -x /usr/X11R6/bin/Xqua...
Shell
#!/bin/zsh -f # sudo_open takes a filename as an argument and allows you to select a # Cocoa or unix application with which to open your file using sudo. ################################################################################ ################################################################################...
Shell
#!/bin/zsh -f if [[ $TERM_PROGRAM != iTerm.app ]]; then open -a Terminal return 0 fi # First, get the directory for the new tab if [[ $# == 0 ]]; then ThisDirectory=$PWD elif [[ $# == 1 && -d "$1" ]]; then ThisDirectory="$@" else print "usage: ntab [directory]" return 1 fi osascript...
Shell
#!/bin/zsh -f # Get the directory for the new tab or terminal window if [[ $# == 0 ]]; then ThisDirectory=$PWD elif [[ $# == 1 && -d "$1" ]]; then ThisDirectory="$@" else print "usage: ntrm [directory]" return 1 fi if [[ $TERM_PROGRAM == Apple_Terminal ]]...
Shell
#!/bin/zsh -f osascript -e "id of app \"$*\"";
Shell
#!/bin/zsh -f # Function open to augment the Apple command open function UsageBlab { FxnName='open' print "" print "\tusage: $FxnName [-abeFfpstxh] [<application\ name>] [<file\ name>]" print "" print "\t$FxnName -a foo [bar] \t Opens application foo [and file bar]" print "\t$Fxn...
Shell
#!/bin/zsh -f # Function to get the IP address of the computer or router if [[ $1 == '-r' || $1 == '-R' ]];then # curl -s http://www.showmyipeurope.com/ | head -n 1 | awk '{print $8}' | perl -p -e 's|</TITLE><META||g' curl -s http://www.showmyip.com/ | head -n 1 | awk '{print $8}' | perl -p -e 's|</TITLE><...
Shell
#!/bin/zsh -f if [[ $(uname) != "Darwin" ]]; then print "This function is specific to OS X" return 1 fi if [[ $( defaults read com.apple.dock workspaces ) = 1 ]]; then open -a Spaces else defaults write com.apple.dock workspaces -bool true killall Dock print "\e[1m Turning \"Spaces\" on. \e[0m " sle...
Shell
#!/bin/zsh -f echo -n "$(posd)" |perl -p -e 's; ;\\\ ;g' | pbcopy
Shell
#!/bin/zsh -f # Function mdattr # Create or revise an existing Apple-type metadata AttributeName of the form kMDItemAttributeName version="0.0.2" ############################################################################### # Created by W . G. Scott on 22 January 2009. # Copyright (c) . All rights rese...
Shell
#!/bin/zsh # sd: switch desktops (using CodeTek virtual desktops or Virtue). # set -x ########################################################################## ########################################################################## function DesktopsRunning { cvd_process=( $(ps -ax | grep "VirtualDesktop...
Shell
#!/bin/zsh -f ############### # finder_update ############### #------------------------------------------------------- # function to update desktop and all open Finder windows #------------------------------------------------------- function finder_update { osascript <<-eof tell application "Finder" update...
Shell
#!/bin/zsh -f #---------------------------------------------------------------------------- # MacRm v0.0.1.1 for use with Darwin-OSX ...... # by Gary Kerbaugh # Send comments, bugs or money to gkerbaugh@nc.rr.com # # MacRm emulates the Gnu FileUtils rm except that it moves file to the user's # Trash directory, using...
Shell
#!/bin/zsh -f # Clean caches for zsh users to force updating if [[ $1 == (-h|-help|--h|--help) || $# > 1 ]]; then print "" print "Usage: zsh_cache_cleaner [-a]" print "Removes old caches for user [default] or everyone [-a] " print "" return 0 fi if [[ $1 == (-a|-all|all|--all) ]]; then ...
Shell
#!/bin/zsh -f autoload -U pashua_run VERSION='0.0.1' # May 11, 2007 # configure_zsh_templates_gui # shell script name shell script function version="0.0.1" ############################################################################### # Created by William Scott on May 11, 2007. # Copyright (c) 2007. All r...
Shell
#!/bin/zsh -f # shell script name cdleft: cd to the directory displayed on the left panel of ForkLift version="0.0.1" # Please note that this is not flawless, as it takes awhile for the plist file to update. ############################################################################### # Created by on . # ...
Shell
#!/bin/zsh -f # bitrot version="0.1.7" # Revision history: # 0.1.7 De-write-protect and reprotect after adding hashtags if needed. # 0.1.6 Warn or add missing hashtags. # 0.1.5 Provide example launchd plist file in comments section. # If a discrepency is...
Shell
#!/bin/zsh -f # configure_zsh_templates # Created by William Scott on 2007-04-27. # Copyright (c) 2007. All rights reserved. ############################################################################## version="0.0.1" ############################################################################## ## emacs or...
Shell
#!/bin/zsh -f # set -x ####################################################################### ## host_setup ## ## ## ## by Wataru Kagawa ## ## Marc...
Shell
#!/bin/zsh -f #=========== # host setup #=========== USE_SSH_KNOWN_HOSTS='yes' USE_CUSTOM_HOSTS='no' USE_ETC_HOSTS='yes' #=========== # user setup #=========== USE_ETC_USERS='yes' USE_CUSTOM_USERS='no'
Shell
#!/bin/zsh -f # if [[ -d $ZDOT && -d $ZDOT_TEMPLATE ]];then # # opendiff $ZDOT $ZDOT_TEMPLATE # print "" # print "Using /usr/bin/opendiff to compare files." # print "" # print "Click on the \e[1m'Exclude: identical'\e[0m checkbox to see which files have changed" # print "" # print "issue ...
Shell
#!/bin/zsh -f # Generate a list of all OS X applications that can be opened with "open -a" ################################################################################## # print "\e[41m\e[1mLoading application name completions for 'open -a' command...\e[0m" # -------------------------------------------...
Shell
#!/bin/zsh -f prompt_text="Select Xwindow to focus:" # Associative array key-value pairs: typeset -A windowarray windowarray=($( xwininfo -root -children -tree | awk '! NF == 0' | \ awk '! /(has no name|0x0|child|\"mozilla-bin\"\:|\"firefox-bin\"\:)/ {y = NF-3; print $1 " " $y}' | \ perl -p -e 's|[\",\(]||...
Shell
#!/bin/zsh -f cd "$(posd)" pwd
Shell
#!/bin/zsh -f if [ -n "$1" ]; then if [ "${1%%/*}" = "" ]; then thePath="$1" else thePath=`pwd`"/$1" fi else thePath=`pwd` fi osascript<<END set myPath to ( POSIX file "$thePath" as alias ) try tell application "Finder" to set the (folder of the front window) to myPath on error -- no open folder windows tel...
Shell
#!/bin/zsh -f # shell script name forklift # Open ForkLift in specified directory or in $PWD version="0.0.1" ############################################################################### # Created by on . # Copyright (c) . All rights reserved. # This program is free software; you can redistribute it an...
Shell
#!/bin/zsh -f # eds, when issued from the command prompt in Terminal, iTerm, or xterm, will cd # into the directory corresponding to the web page displayed in Safari and # will then open the file in whatever HTML editing program you have specified # below. # Define this as you wish: # HTML_EDITOR='edit' ...
Shell
#!/bin/zsh -f #---------------------------------------------------------------------------- # MacRm v0.0.1.1 for use with Darwin-OSX ...... # by Gary Kerbaugh # Send comments, bugs or money to gkerbaugh@nc.rr.com # # MacRm emulates the Gnu FileUtils rm except that it moves file to the user's # Trash directory, using...
Shell
#!/bin/zsh -f #sysctl hw.logicalcpu | awk '{print $NF}' sysctl -n hw.ncpu return $?
Shell
#!/bin/zsh -f if [[ $TERM_PROGRAM != iTerm.app ]]; then open -a Terminal return 0 fi # First, get the directory for the new tab if [[ $# == 0 ]]; then ThisDirectory=$PWD elif [[ $# == 1 && -d "$1" ]]; then ThisDirectory="$@" else print "usage: ntab [directory]" return 1 fi osascript...
Shell
#!/bin/zsh -f # Put full path in finder version="0.0.2" ############################################################################### # Created by on 2007-11-17. # Copyright (c) 2007. All rights reserved. # This program is free software; you can redistribute it and/or modify # it under the terms of t...
Shell
#!/bin/zsh -f # setopt sh_word_split # wrapper function fink to accompany completion function _fink # generates completion cache # displays "fink [first argument]" in tab or title bar while running # leaves functionality of the command fink otherwise unchanged # Author: W G Scott # Nov 28, 2004 # Last rev...
Shell
#!/bin/zsh -f # set -x # Edit function, version 2.0.1 # October 17, 2006 # Complete re-write of the cumbersome version 1.x.y # Revised July 9, 2007 to fix a major bug #------------------------------------------------------------------------------ # Find out what the user prefers to use for various editing tasks i...
Shell
#!/bin/zsh -f if [ -n "$1" ]; then if [ "${1%%/*}" = "" ]; then thePath="$1" else thePath=`pwd`"/$1" fi else thePath=`pwd` fi osascript<<END set myPath to ( POSIX file "$thePath" as alias ) try tell application "Finder" to set the (folder of the front window) to myPath on error -- no open folder windows tel...
Shell
#!/bin/zsh -f # shell script name cdright: cd to the directory displayed on the right panel of ForkLift version="0.0.1" # Please note that this is not flawless, as it takes awhile for the plist file to update. ############################################################################### # Created by on . ...
Shell
#!/bin/zsh -f if [[ $(uname) != "Darwin" ]]; then print "This function is specific to OS X" return 1 fi if [[ $( defaults read com.apple.dock workspaces ) = 1 ]]; then open -a Spaces else defaults write com.apple.dock workspaces -bool true killall Dock print "\e[1m Turning \"Spaces\" on. \e[0m " sle...
Shell
#!/bin/zsh -f # Ben Holt # http://www.macosxhints.com/article.php?story=2007122622572152 # Modified for most recent powermate version. function find_version { if [[ -f /Library/PreferencePanes/PowerMate.prefPane/Contents/Info.plist ]];then version_num=$(grep "PowerMate version" /Library/PreferencePanes/Pow...
Shell
#!/bin/zsh -f # if [[ -d $ZDOT && -d $ZDOT_TEMPLATE ]];then # # opendiff $ZDOT $ZDOT_TEMPLATE # print "" # print "Using /usr/bin/opendiff to compare files." # print "" # print "Click on the \e[1m'Exclude: identical'\e[0m checkbox to see which files have changed" # print "" # print "issue ...
Shell
#!/bin/zsh -f # set -x # function/shell script "composer" for opening html files for editing # using Mozilla or Netscape composer # open Mozilla.app or Netscape.app in composer mode, optionally with # a given file name as an argument. Uses mozilla.app by default if both # it and netscape are present, unless -n fla...
Shell
#!/bin/zsh -f # # Battery by Göran Larsson # # MacOS X/Darwin command line tool showing battery status. # # Version 1.0 2003-03-16 Initial release. # Version 1.1 2003-10-14 Changes to handle Panther. # Version 1.2 2004-11-16 Fix bug causing divide by zero. Output changes for long form. # Version 1.3 ...
Shell
#!/bin/zsh -f version="2.0.0" # The script must be run as an admin user # if [[ -z $(/usr/bin/id -p $USER | grep admin) ]];then print "You must be an administrative user with sudo privileges in order to run $0" fi # Obtained and modified from a bash shell script available at # http://www.osxfaq.com/tips/unix-trick...
Shell
#!/bin/zsh -f # function to accompany completion function _fink # generates completion cache # The fink function will run this in the background after fink commands # such as selfupdate|selfupdate-cvs|selfupdate-rsync|install|remove|purge|reinstall|index|update|update-all # are issued, to ensure that the completio...
Shell
#!/bin/zsh -f osascript -e "id of app \"$*\"";
Shell
#!/bin/zsh -f # Activate the function keys. tab_number=1 print "Please wait ...." osascript <<-eof tell application "Finder" activate activate application "System Preferences" tell application "System Events" if (system attribute "sysv") is greater than or equal to 4144 then -- Mac...
Shell
#!/bin/zsh -ef if [[ -d $HOME/.a2ps ]];then command mkdir -p $HOME/.a2ps fi if [[ -f $HOME/.a2ps/a2psrc ]]; then mv $HOME/.a2ps/a2psrc $HOME/.a2ps/a2psrc_$$ fi ln -s $ZDOT/zshrc.d/local-functions/etc/a2psrc $HOME/.a2ps/a2psrc command a2ps -r --columns=2 "$@" if [[ -f $HOME/.a2ps/a2psrc_$$ ]];then rm $...
Shell
#!/bin/zsh -f #---------------------------------------------------------------------------- # MacRm v0.0.1.1 for use with Darwin-OSX ...... # by Gary Kerbaugh # Send comments, bugs or money to gkerbaugh@nc.rr.com # # MacRm emulates the Gnu FileUtils rm except that it moves file to the user's # Trash directory, using...
Shell
#!/bin/zsh -f # zipit: Use ditto to create zip files with resource forks (now default) # Function authored by Gary Kerbaugh. Updated syntax W G Scott May 4 2007 # I have added -V for verbose output. function zipit { ditto -c -k -V "$@" "${1}.zip"; }
Shell
#!/bin/zsh -xf # Start a full-screen enlightenment session but in a nested window. ############################################################################### # Do some reality checks: # No point in using this unless we are on OS X: if [[ $(uname) != Darwin ]];then print "This only works for OS X. This does not...
Shell
#!/bin/zsh -f # use mdfind the way you use locate to find a file mdfind "$@" | grep "$@"
Shell
#!/bin/zsh -f LISTARRAY=( /usr /bin /sbin /private /etc /var /tmp ) if [[ "$1" == "-undo" || "$1" == "--undo" || "$1" == "undo" ]]; then foreach file in $LISTARRAY if [[ -h $file ]];then sudo /Developer/Tools/SetFile -P -a V $file else sudo /Developer/Tools/SetFile -a V $file ...
Shell
#!/bin/zsh -f ####################################################################### ## user_setup ## ## ## ## by Wataru Kagawa ## ## March 05, 2006...
Shell
#!/bin/zsh -f # shell script name forklift # Open ForkLift in specified directory or in $PWD version="0.0.1" ############################################################################### # Created by on . # Copyright (c) . All rights reserved. # This program is free software; you can redistribute it an...
Shell
#!/bin/zsh -f #---------------------------------------------------------------------------- # MacRm v0.0.1.1 for use with Darwin-OSX ...... # by Gary Kerbaugh # Send comments, bugs or money to gkerbaugh@nc.rr.com # # MacRm emulates the Gnu FileUtils rm except that it moves file to the user's # Trash directory, using...
Shell
#!/bin/zsh -f # Function to run a program in second X11 display # without disturbing the default 24-bit X11. # See also 8bitx # Created by William Scott on 2007-04-26. # Copyright (c) 2007. All rights reserved. version="0.0.1" # Check to make sure /usr/X11R6/bin/Xquartz is present if [[ ! -x /usr/X11/bin/Xq...
Shell
#!/bin/zsh -f # fink_web opens up the fink package database website. If $1 is provided, # then the package database opens to the page for the named package if [[ -z $1 ]];then open http://pdb.finkproject.org/pdb/ elif [[ $1 == (-s|--search|-search) ]];then open http://pdb.finkproject.org/pdb/"search.php?summa...
Shell