Mercurial > dotfiles
view .shell.d/50.misc_functions.zsh @ 472:79110d94a0c2
hg: filter out display of remotenames that start with "/"
I may want to filter out anything that contains a "/" since that'd be
a URL instead of a path shortcut, but I'll do that later if it becomes
obviously the right choice.
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Fri, 01 Feb 2019 14:08:50 -0500 |
parents | 31a11febd751 |
children |
line wrap: on
line source
# Cleanup pyc files in $1 function clean_pyc() { local DIR DIR='.' if [ "x$1" != "x" ] ; then DIR=$1 fi find $DIR -name \*.pyc -print0 | xargs -0 rm } ## Searching stuff # Function to use mdfind instead of find on Mac OS X function ffind() { mdfind -onlyin "$PWD" "kMDItemFSName=$1" } # Function to use grep on a particular filetype in the current dir. function tgrep() { egrep -R --include="*.$1" "$2" . } ## Django stuff function django_settings_set() { export DJANGO_SETTINGS_MODULE="$1" } # run a django app in spawn function spawn_django() { if [ -e ./eco/bin/spawn ] ; then eco/bin/spawn --factory=spawning.django_factory.config_factory $@ else spawn --factory=spawning.django_factory.config_factory $@ fi }