Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

We’re showing branches in this repository, but you can also compare across forks.

base fork: dbrady/bin
base: 7ac88e6c76
...
head fork: dbrady/bin
compare: 836209bba1
  • 4 commits
  • 3 files changed
  • 0 commit comments
  • 1 contributor
Commits on Jan 31, 2012
David Brady Removed commented-out cruft a27a4cc
Commits on Apr 03, 2012
David Brady Added myip (gets local inet ip addrs) 477fccb
David Brady Refactor aquamacs launcher
* Factor out app name

* Because Aquamacs\ Emacs.app was renamed to Aquamacs.app, but I
  switch versions occasionally
6450b9f
David Brady Commented set_current_project 836209b
Showing with 15 additions and 8 deletions.
  1. +3 −3 aquamacs
  2. +3 −0  myip
  3. +9 −5 set_current_project
6 aquamacs
View
@@ -6,8 +6,8 @@
# Revisions
# 1.0 - first version to be included with Aquamacs [2007-03-17 David Reitter]
# 1.1 - delayed deletion of new files [2008-11-12 David Reitter]
-
-$app_path = '/Applications/Aquamacs\ Emacs.app';
+$app_name='Aquamacs';
+$app_path = "/Applications/$app_name.app";
#$app_path = '<AQUAMACS-PATH>';
# $pid = qx"ps auxc | awk '/^$ENV{'USER'} .* Aquamacs Emacs\$/ {print \$2}'";
@@ -34,7 +34,7 @@ system("touch $args") if ($tmpfiles);
system("open -a $app_path $args");
} else {
- system("$app_path/Contents/MacOS/Aquamacs\\ Emacs $args 2>/dev/null &");
+ system("'$app_path/Contents/MacOS/$app_name' $args 2>/dev/null &");
}
# delay deletion because Emacs can't open non-existing documents
3  myip
View
@@ -0,0 +1,3 @@
+#!/bin/sh
+ifconfig | grep 'inet ' | grep -v 127.0.0.1 | awk '{ print $2 }'
+
14 set_current_project
View
@@ -41,8 +41,16 @@
# * The config reader should probably read the username and password
# from tho config/database.yml file. Yeah. It should totally do
# that. It doesn't, though.
-target = ARGV[0] || Dir.pwd
+#
+# TODO: This sets an alias named "cdp" to cd into the current project
+# folder. I keep a .nav file full of aliases, however; and ideally I'd
+# like to specify something like "set_current_project --nav cdxyz" and
+# have this script add "alias 'cdxyz'='cd this/project/folder'" to the
+# .nav file. It should also check the file for collisions and abort,
+# and/or allow a -f option to force overwriting the nav.
+
+target = ARGV[0] || Dir.pwd
# if [ $# -lt 1 ]; then
# TARGET=`pwd`
@@ -76,7 +84,3 @@ File.open(File.expand_path("~/.current_project"), "w") do |file|
end
puts "Current project has been set to #{target}. You will automatically cd to this folder on login."
-
-# echo export CURRENT_PROJECT=\"$TARGET\" > ~/.current_project
-# echo cd \"$TARGET\" >> ~/.current_project
-# echo Current project has been set to ${TARGET}. You will automatically cd to this folder on login.

No commit comments for this range

Something went wrong with that request. Please try again.