Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Fletch (75)

  (email not shown publicly)
AOL IM: lemurnomicon (Add Buddy, Send Message)

Frink? Frink? Phtang!

Journal of Fletch (75)

Friday March 26, 2004
07:58 AM

Changing OS X Location from the command line

[ #18070 ]

Found out about scselect yesterday from here. A couple of minutes effort on the train and I now can change from a shell without having to mouse up to the apple menu.

zsh ++

## _scselect -- Completion for OS X Network Location utility
_scselect () {
    local locs
    locs=( $( scselect |& \
              perl -lne 'next if/^\S/;/\(([^)]+)\)/&&print qq{"$1"}' ) )
    _arguments -C "*:Network Location Set:($locs)"

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.