Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make usable as a ZSH plugin (simply adds to PATH) This also hard codes the python scripts with the abspath to the osx python interpreter, that way homebrew doesn't get in the way and such. #1

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion adjust_exif_dates.py → adjust_exif_dates
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/python

#
# Adjust EXIF dates with exiftool. This will take a batch of JPEG files,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion brace-expression.py → brace-expression
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/python
#
# Converts a set of paths (on stdin, one path per line) into a shell brace expression.
#
Expand Down
2 changes: 1 addition & 1 deletion checklibs.py → checklibs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/python
#
# checklibs.py
#
Expand Down
2 changes: 1 addition & 1 deletion copy-dummy-file-tree.py → copy-dummy-file-tree
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/python

# Copies a directory tree, but all files will be zero-length placeholder/dummy files.

Expand Down
2 changes: 1 addition & 1 deletion dmgtool.py → dmgtool
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/python

#
# Library and tool for some OS X DMG file operation, using hdiutil
Expand Down
2 changes: 1 addition & 1 deletion dropbox-conflict-helper.py → dropbox-conflict-helper
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/python
#
# Dropbox conflict helper. To be run from within a BBEdit shell worksheet
#
Expand Down
2 changes: 1 addition & 1 deletion dump-launchd-bookmarks.py → dump-launchd-bookmarks
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/python

import Foundation
import plistlib
Expand Down
2 changes: 1 addition & 1 deletion dump-sandbox-extensions.py → dump-sandbox-extensions
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/python
#
# Maintained at http://github.com/liyanage/macosx-shell-scripts/dump-sandbox-extensions.py
#
Expand Down
2 changes: 1 addition & 1 deletion dump-scutil.py → dump-scutil
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/python
#
# dump the contents of all toplevel keys in scutil's toplevel list.
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/python
#
# Reads the weather station list from http://weather.gov/xml/current_obs/index.xml
# and prints the stations sorted by distance to a given lat/long pair
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/python

import sys
import os
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion grep-preferences.py → grep-preferences
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/python
#
# Grep preferences plists
#
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion histogram.py → histogram
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/python
#
# Print histogram of frequency of input lines
#
Expand Down
1 change: 1 addition & 0 deletions keychain_password.py → keychain_password
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/python

import subprocess, re

Expand Down
2 changes: 1 addition & 1 deletion keyedarchive.py → keyedarchive
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/python
#
# Decode NSKeyedArchiver blobs for debugging purposes
#
Expand Down
File renamed without changes.
2 changes: 2 additions & 0 deletions macosx-shell-scripts.plugin.zsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/zsh
path+=("${0:h}")
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is loaded automagically via any ZSH framework upon instantiation. ZSH treats path as an array view on your standard PATH variable, so this just appends PATH with a single element. $0 is of course the script name, and the modifier :h is equivalent to dirname

File renamed without changes.
2 changes: 1 addition & 1 deletion notificationlistener.py → notificationlistener
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/python

# Listen for and dump NSDistributedNotifications
#
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion usernotification.py → usernotification
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/python
#
# Send OS X NSUserNotifications from Python.
#
Expand Down
2 changes: 1 addition & 1 deletion wordlist.py → wordlist
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/python

import random
import sys
Expand Down