• Stars
    star
    679
  • Rank 66,532 (Top 2 %)
  • Language
    Shell
  • License
    MIT License
  • Created about 14 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A small collection of command line tools for Mac OS X, incl.: clipcat, dict, eject, launch, ql, swuser, trash & with.

tools-osx README

by Morgan Aldridge [email protected]

tools-osx on OpenHub Donate

OVERVIEW

A small collection of Mac OS X command line tools that I’ve developed over the years. Similar to the NextStep and Mac OS X commands open, pbcopy, and pbpaste, most of these tools are bash scripts created as an exercise to hone my bash-fu. There are also a number of Perl and Ruby scripts submitted by others.

TOOLS

clipcat

clipcat prints and concatenates Mac OS text clippings. Submitted by Daphne Preston-Kendal.

dict

dict performs a look-up in the Mac OS X dictionary. Note: unlike the other scripts provided, this one requires that you have MacRuby installed. Submitted by Daphne Preston-Kendal.

eject

eject ejects a volume or network volume and all other volumes on the same local device. A shorter, simpler, smarter wrapper of diskutil’s various eject/unmount options and allows specifying either a full path in /Volumes or just the volume name.

launch

launch searches for and launches applications. It's a slightly smarter wrapper for open -a with wildcard matching via Spotlight, if available, or find.

ql

ql opens files with the Mac OS X Quick Look feature.

swuser

swuser switches users using the Mac OS X Fast User Switching feature. You can either switch out to the login window or to another user. Note: unfortunately, this is not currently compatible with screen.

trash

trash allows trashing of files instead of tempting fate with rm. Correctly handles trashing files on other volumes, uses the same filename renaming scheme as Finder for duplicate file names, can list trash contents w/disk usage summary, and empty trash (including securely) w/confirmation. Does not require Finder to be running.

with

with sets the application with which specified documents will be opened. It can even change and open in one fell swoop. Submitted by Daphne Preston-Kendal.

INSTALLATION

Installing from Source

Installing all tools:

  1. Clone this repository or download and extract the tools.
  2. Run rake.
  3. Run rake install. (If you don't have write permission on /usr/local/bin, you'll need to prepend sudo.)

Installing one or more specific tools:

  1. Clone this repository or download and extract the tools.
  2. Run rake
  3. Run rake 'install[ql,trash]', specifying individual tools in a comma separated list between the square brackets. (If you don't have write permission on /usr/local/bin, you'll need to prepend sudo.)

Installing Using a zsh Plugin Manager

Note: You cannot install clipcat, dict, or with using this method.

macOS 10.15 Catalina and newer now use zsh as the default shell. If you're using a zsh plugin manager, you can install individual tools as follows and they'll be automatically downloaded, installed, and kept up-to-date:

  • Using zinit: Add the following to your ~/.zshrc file for each tool you wish to install, trash, for example:
zinit wait'1' lucid light-mode as"program" pick"src/trash" for morgant/tools-osx

OTHER TOOLS

Looking for other Mac OS X-specific command line tools to complement these? Check out the following:

SPECIAL THANKS

Special thanks to: Daphne Preston-Kendal for all her submissions and collaboration; Matt Brictson for his initial relative path bug fix in trash; huyz for the improved determination of Finder’s PID to prevent possible false-positives in trash.

More Repositories

1

mlvwm

Macintosh-like Virtual Window Manager (official repo)
C
190
star
2

finishGoogleCodeGitHubWikiMigration

Finish the migration of Google Code-exported project wikis in GitHub repos.
Shell
33
star
3

realpath

A portable bash implementation of `realpath`.
Shell
18
star
4

mlvwmrc

Macintosh-like Virtual Window Manager (MLVWM) configuration files
Makefile
17
star
5

basiliskiivm

Manage and run multiple BasiliskII VMs.
Shell
14
star
6

git-resource-fork-hooks

Git hooks for projects containing old Mac HFS/HFS+ resource forks
Shell
7
star
7

acl-tools-osx

A small collection of tools hacking OS X ACLs support onto find, chown, and chgrp.
Shell
6
star
8

43f

Simple storage/archive management comprised of 43 folders per year.
Shell
5
star
9

swupdate-openbsd

Run all OpenBSD software updates from one command
Shell
5
star
10

twitter-statuses-badge

A customizable Twitter JavaScript badge. Defunct.
JavaScript
5
star
11

bashalytics

A bash utility for fetching reports from Google Analytics using the Core Reporting v3 API
Shell
5
star
12

mlvwmrc-ideskrc

iDesk additions for MLVWM via mlvwmrc
Makefile
4
star
13

xwf

X Window Filemanager
C
4
star
14

cash-out

Cash register cash-out sheet web app optimized for iOS.
JavaScript
4
star
15

xap

x application panel and filemanager (mirror)
C
4
star
16

newtssl

An SSL/TLS extension/library for Newton OS 2.1
3
star
17

tiggit

Automatic remote git repository mirroring.
Shell
3
star
18

Xsunaba

Sandbox X11 applications on OpenBSD
Shell
3
star
19

mlvwmrc-openbsd-apm

OpenBSD APM additions for MLVWM via mlvwmrc
Shell
3
star
20

cipheraudit

A bash script to simplify auditing SSL/TLS cipher suites on web & email servers.
Shell
3
star
21

xsndiomenu

An X11 menu to control sndiod(8) under OpenBSD
Shell
3
star
22

NewtonScriptMode

SubEthaEdit/Coda Mode (syntax highligher) for the NewtonScript language.
AppleScript
3
star
23

bash_stub

The stub I use for creating new command line tools using bash.
Shell
2
star
24

mlvwmrc-xosview2

Xosview2 additions for MLVWM via mlvwmrc
Shell
2
star
25

newtspeed

GPS speedometer for Newton OS 2.1
2
star
26

dasu

Utility for packaging up my software projects for public release.
Shell
2
star
27

postmortem

A bash tool for managing my daily postmortem reports.
Shell
1
star
28

svnsplit

Split subversion repositories
Shell
1
star
29

chromium_recover_dbs

Verify & repair chromium sqlite databases
Shell
1
star
30

mlvwmrc-x11vnc

x11vnc MenuExtra for MLVWM via mlvwmrc
Makefile
1
star
31

sysmon-startupitem

Sysmon StartupItem/launchd job
Shell
1
star
32

NSUnit

An xUnit testing framework for NewtonScript.
1
star
33

my-openbsd-ports

WIP OpenBSD ports from /usr/ports/mystuff
Makefile
1
star
34

mlclock

Macintosh-like Clock
C
1
star
35

vmware-archive

Create archive copies of VMware Fusion VMs
Shell
1
star