Re:Ask HN: Best Unix Tricks?
by uggedal on Tuesday September 08, 2009 @09:14AM
(#810869)
My most useful zsh functions:
[ Parent
| on HN ]
Perhaps Python specific but I use this a lot
epy () {
cmd="import $1 as a ; print a.__file__.endswith('.pyc') and a.__file__[:-1] or a.__file__"
file=$(/usr/bin/env python -c $cmd)
echo $file
emacsclient --no-wait $file
}