All pastes #101541 Raw Edit

Unnamed

public shellscript v1 · immutable
#101541 ·published 2006-07-26 23:23 UTC
rendered paste body
# nifty bookmark functions# Thought up by Christoph Sommer <http://www.deltadevelopment.de/users/christoph/>bm() {	if [ -z "$1" ]	then		echo "Use 'bm TAG' to store a bookmark called TAG"		echo ""		echo "Last bookmarks stored were..."		tail -n3 ~/.directory-bookmarks	else		echo "$1 $(pwd)" >> ~/.directory-bookmarks	fi}bb() {	if [ -z "$1" ]	then		echo "Use 'bb TAG' to goto a stored bookmark called TAG"		echo ""		echo "Last bookmarks stored were..."		tail -n3 ~/.directory-bookmarks	else		local DEST=$(sed -n -e "s/$1 //p" ~/.directory-bookmarks | tail -n1)		if [ -z "$DEST" ]		then			echo "Found no bookmark by that name"			echo ""			echo "Last bookmarks stored were..."			tail -n3 ~/.directory-bookmarks		else			cd $DEST 		fi	fi}