#!/bin/bash
#########################################################
# 							#
# This is BashStyle-NG					#
#							#
# Licensed under GNU GENERAL PUBLIC LICENSE v3    	#
#							#
# Copyright 2007 - 2014 Christopher Bratusek		#
#							#
#########################################################

case $1 in

	--help | -h | "")

		bsng-help -a "Christopher Roy Bratusek" -e "nano@tuxfamily.org" -h "http://www.nanolx.org/"\
			-l "GNU GPL v3" -n "bookmark" -s "create permanent bookmarks for directories" -v "${BSNG_VERSION}" -y "2013"\
			-o "alias:|will create a permanent alias go-\$alias for current directory"

	;;

	*)	if [[ ${1} && ! $(alias | grep -w go-${1}) ]]; then
			echo "alias go-$1='cd $PWD'" >> $HOME/.bookmarks
			. $HOME/.bookmarks
		else
			echo "bookmark go-$1 already exists."
		fi
	;;

esac