#!/bin/bash
#########################################################
# 							#
# This is BashStyle-NG  				#
#							#
# Licensed under GNU GENERAL PUBLIC LICENSE v3    	#
#							#
# Copyright 2007 - 2013 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 "bashtips" -s "show useful bash tips" -v "${BSNG_VERSION}" -y "2013"\
			-o "no options:|"

	;;

	* )

cat <<EOF
			DIRECTORIES
			-----------
			~-          Previous working directory
			pushd tmp   Push tmp && cd tmp
			popd        Pop && cd

			GLOBBING AND OUTPUT SUBSTITUTION
			--------------------------------
			ls a[b-dx]e Globs abe, ace, ade, axe
			ls a{c,bl}e Globs ace, able
			\$(ls)      \`ls\` (but nestable!)

			HISTORY MANIPULATION
			--------------------
			!!        Last command
			!?foo     Last command containing \`foo'
			^foo^bar^ Last command containing \`foo', but substitute \`bar'
			!!:0      Last command word
			!!:^      Last command's first argument
			!\$       Last command's last argument
			!!:*      Last command's arguments
			!!:x-y    Arguments x to y of last command
			C-s       search forwards in history
			C-r       search backwards in history

			LINE EDITING
			------------
			M-d     kill to end of word
			C-w     kill to beginning of word
			C-k     kill to end of line
			C-u     kill to beginning of line
			M-r     revert all modifications to current line
			C-]     search forwards in line
			M-C-]   search backwards in line
			C-t     transpose characters
			M-t     transpose words
			M-u     uppercase word
			M-l     lowercase word
			M-c     capitalize word

			COMPLETION
			----------
			M-/     complete filename
			M-~     complete user name
			M-@     complete host name
			M-\$    complete variable name
			M-!     complete command name
			M-^     complete history
EOF
	;;

esac
