summaryrefslogtreecommitdiff
path: root/d
diff options
context:
space:
mode:
authorTslil Clingman <hiato1@gmail.com>2013-08-09 14:03:45 +0200
committerTslil Clingman <hiato1@gmail.com>2013-08-09 14:03:45 +0200
commitf2b32d25177be465c7209072eb93ae14fc16dfa3 (patch)
tree52e8d412518d5b3d4c70c068b7ef11dde6cac03d /d
parent3bd9f307d5cd0128ea4fa37aaecaadac5629521c (diff)
The vcs script I use for my PS1 and some minor changes
Diffstat (limited to 'd')
-rwxr-xr-xd13
1 files changed, 0 insertions, 13 deletions
diff --git a/d b/d
deleted file mode 100755
index 982e885..0000000
--- a/d
+++ /dev/null
@@ -1,13 +0,0 @@
-# Smart directory changer using the power of grep ;)
-# source in a function j() { cd `d $*`} or some such
-#!/bin/bash
-[ "$1" = "$HOME" ] && echo $HOME && exit
-fl="$HOME/.local/share/dir_lst";[ ! -f "$fl" ] && touch "$fl"
-[ "$2" = "!" ] && echo "$1" && exit || \
-ln=`grep -n "$1" "$fl" | head -n 1 | cut -d : -f 1`
-if [ ! "$1" = "" ]; then if [ ! "$ln" = "" ]; then
-echo -e "$ln m0\n1p\nw"|ed -s "$fl"||echo \?; else
-l=$1; while [ ! -d "$l" ]; do echo \?; read l; done;
-l=`echo "$l" | sed "s|^[^/]|$PWD/&|"`;
-echo -e "0i\n$l\n.\n1p\nw" | ed -s "$fl"; sed -i '43,$d' "$fl"
-fi; else echo -e "2 m0\n1p\nw" | ed -s "$fl"; fi;