changeset 309:6095d439d1f2

new stuff! realwhich
author Jeff Hammel <jhammel@mozilla.com>
date Thu, 16 May 2013 23:27:18 -0700
parents 8be2beb2d952
children a6cd6900419e
files .bashrc .emacs
diffstat 2 files changed, 12 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/.bashrc	Thu May 16 16:05:52 2013 -0700
+++ b/.bashrc	Thu May 16 23:27:18 2013 -0700
@@ -281,6 +281,7 @@
     mv "$NEWNAME" "$2"
 }
 
+### `which` commands
 
 whview() {
     # which view
@@ -292,6 +293,14 @@
     emacs -nw `which $@`
 }
 
+realwhich() {
+    # which -> real paths
+    command which $@ | while read line
+    do
+        python -c "import os; print os.path.realpath('${line}')"
+    done
+}
+
 ### functions for python
 
 pyfile() {
--- a/.emacs	Thu May 16 16:05:52 2013 -0700
+++ b/.emacs	Thu May 16 23:27:18 2013 -0700
@@ -12,6 +12,7 @@
 (if (boundp 'tool-bar-mode) (tool-bar-mode 0))
 
 ;; ...or a startup message
+;; instead, it'd be nice to start with a list of recent files (recentf)
 (setq inhibit-startup-message t)
 
 ;; no f-ing backup files
@@ -57,11 +58,11 @@
 (put 'upcase-region 'disabled nil)
 
 ;;;; line/col #s
-
-;; Show line and column numbers in the mode line
+;;;; Show line and column numbers in the mode line
 (line-number-mode 1)
 (column-number-mode 1)
 
+
 ;;;; modes
 
 ;; Bind major editing modes to certain file extensions