# HG changeset patch # User Jeff Hammel # Date 1760998939 25200 # Node ID 7c4be71a560bac0299f7968f6364a3546cb54067 # Parent 84543f2cda0dcc42f37c0c0c8fe9e4d24a8dc10d remove old aliases diff -r 84543f2cda0d -r 7c4be71a560b .bash_overrides --- a/.bash_overrides Tue Oct 14 14:20:55 2025 -0700 +++ b/.bash_overrides Mon Oct 20 15:22:19 2025 -0700 @@ -1,102 +1,7 @@ -#!/bin/bash - -### command overrides too elaborate for aliases - -cd() { - - ENV="" - if [ -n "${VIRTUAL_ENV}" ] - then - ENV="${VIRTUAL_ENV}" - fi - - - if [ -d "$@" ] - then - command cd "$@" - else - if [ -e "$@" ] - then - command cd `dirname "$@"` - else - if [[ "$@" == "^" && -n "${ENV}" ]] - then - command cd "${ENV}" - else - command cd "$@" - fi - fi - fi - - # handle ENVs - if [ -e "bin/activate" ] - then - if [ -n "${ENV}" ] - then - if [ "${ENV}" != "${PWD}" ] - then - if [[ -n "`type -t deactivate`" ]] - then - deactivate - fi - else - return - fi - fi - source "bin/activate" - fi - - ENV="" - if [ -n "${VIRTUAL_ENV}" ] - then - ENV="${VIRTUAL_ENV}" - fi - - if [ -n "${ENV}" ] - then - FULLPWD=$(python -c 'import os; print (os.getcwd())') - if (( ! `expr "${FULLPWD}" : "${ENV}"` )) - then - if [[ -n "`type -t deactivate`" ]] - then - deactivate - fi - fi - fi - unset ENV -} - function emacsclient() { command emacsclient $@ > /dev/null & } -function find { - - if (( ! $# )) - then - command find - return - fi - - if [ -d $1 ] - then - DIR="$1" - shift - else - DIR="$PWD" - fi - - if [ "$#" == "1" ] - then - `which find` -L "$PWD" -not -path '*.svn*' -iname "$1" - return 0 - fi - - COMMAND="`which find` -L \"$DIR\" -not -path '*.svn*' $@" -#echo $COMMAND # for debugging - `which find` -L "$DIR" -not -path '*.svn*' "$@" -} - # make hg safer since $HOME is versioned function hg { if [[ "$(command hg root)" == "${HOME}" ]] @@ -125,31 +30,3 @@ fi } - -function mv { - num=$# - if (( num == 0 )) - then - command mv "$@" - return - fi - last=${!#} - if [[ "${last:(-1)}" == "/" ]] - then - directory=${last} - else - directory=$(dirname ${last}) - fi - if [[ ! -e "${directory}" ]] - then - mkdir -p "${directory}" - fi - command mv "$@" - return - -} - -function unlink { - command unlink `echo $@ | sed 's/\/$//g'` -} -