X-Git-Url: https://code.delx.au/dotfiles/blobdiff_plain/1c4f878eab0e159111d70061507b5f01877ad66c..d49e4093e721bb06c46e3837c43f38baf1af1a41:/.bash/interactive diff --git a/.bash/interactive b/.bash/interactive index 969d153..cc4ca57 100644 --- a/.bash/interactive +++ b/.bash/interactive @@ -93,7 +93,7 @@ screen*) 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' @@ -104,7 +104,6 @@ alias less='less -R' 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' @@ -115,8 +114,12 @@ alias pstree='ps --forest -weo pid,user:16,args --sort start_time|less -S' 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' \ @@ -144,6 +147,19 @@ function slowshell { 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 @@ -151,7 +167,8 @@ 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"