esac
# Useful aliases
-alias ls='ls --color=auto'
+alias ls='ls --color=auto -v'
alias ll='ls -hlF'
alias la='ls -ha'
alias l='ls -halF'
alias grep='grep --color=auto --exclude "*.svn-base"'
alias scp='scp -o ControlPath=none'
alias bc='bc -ql'
-alias vv='vncviewer -encodings "tight hextile copyrect"'
alias watch='watch -n1'
alias sudo='sudo ' # ability to use aliases with sudo
alias sudosu='sudo su -l -s /bin/bash'
alias pstime='ps -weo pid,user:16,lstart,args --sort start_time|less -S'
-# Colorful man pages
+# Super man!
+# Colourful headings
+# Terminal title
function man {
+ tput tsl; echo "man $@"; tput fsl
+
env \
LESS_TERMCAP_md=$'\E[01;38;5;74m' \
LESS_TERMCAP_me=$'\E[0m' \
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 "$@"
+}
+
# 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
-
+# Prevent overwriting existing files on stdout redirection
+set -o noclobber
# Local customisations
[ -r "${HOME}/.bash/interactive_local" ] && source "${HOME}/.bash/interactive_local"