-# Bash should check the terminal size after every command terminates
-shopt -s checkwinsize
-# Don't attempt to tab-complete an empty line
-shopt -s no_empty_cmd_completion
+# Super man!
+# Colourful headings
+# Terminal title
+function man {
+ echo -ne "\033]0;man $@\007"
+
+ env \
+ LESS_TERMCAP_md=$'\E[01;38;5;74m' \
+ LESS_TERMCAP_me=$'\E[0m' \
+ LESS_TERMCAP_us=$'\E[04;38;5;146m' \
+ LESS_TERMCAP_ue=$'\E[0m' \
+ man "$@"
+}
+
+# Usage: mcd somedir
+# Creates the directory if it doesn't exist, and changes into it
+function mcd {
+ mkdir -p "${1}" &&
+ cd "${1}"
+}
+
+# Usage: editf somefile
+# Does a recursive search of the current directory for somefile, then edits it
+function editf {
+ find . -iname "${1}" -exec $EDITORBG '{}' +
+}
+
+# Usage: edit somefile [otherfiles ...]
+function edit {
+ $EDITORBG "$@"
+}
+
+# Sets the nice and ionice priorities for the current shell to the lowest values
+function slowshell {
+ ionice -c 3 -p $$
+ renice -n 19 -p $$
+}
+
+# SSH to an unknown host and print the new known_hosts entry
+function ssh_new {
+ local new_known_hosts_file="$(mktemp)"
+ ssh -o UserKnownHostsFile="$new_known_hosts_file" "$@" echo Connection ok
+ cat "$new_known_hosts_file"
+ rm -f "$new_known_hosts_file"
+}
+
+# SSH without verifying host key
+function ssh_unsafe {
+ ssh -o StrictHostKeyChecking=no "$@"
+}
+
+
+
+###########
+# The end #
+###########