if ! builtin complete 2>&1 | grep 'not a shell builtin' >/dev/null; then
# Helper!
-export COMPLETION_DIR_SSH=~/.ssh/hosts
-export COMPLETION_DIR_TELNET=~/.telnet/hosts
-export COMPLETION_DIR_RDP=~/.rdp/hosts
-export COMPLETION_DIR_PING="$COMPLETION_DIR_SSH $COMPLETION_DIR_TELNET $COMPLETION_DIR_RDP"
+COMPLETION_DIR_SSH=~/.ssh/hosts
+COMPLETION_DIR_TELNET=~/.telnet/hosts
+COMPLETION_DIR_RDP=~/.rdp/hosts
+COMPLETION_DIR_PING="$COMPLETION_DIR_SSH $COMPLETION_DIR_TELNET $COMPLETION_DIR_RDP"
function _generic_completion() {
COMPLETION_DIR=${1+"$@"}
info="$info$vimchild"
fi
if [ "${TERM##screen}" = "$TERM" ]; then
- export PROMPT_COMMAND="echo -ne '\033]0;$info\033\0134\r\033[K'"
+ PROMPT_COMMAND="echo -ne '\033]0;$info\033\0134\r\033[K'"
else
- export PROMPT_COMMAND='echo -ne "\033k\033\0134"'
+ PROMPT_COMMAND='echo -ne "\033k\033\0134"'
fi
unset blank info vimchild SSH_FORWARDED
# SVN: magenta.
case $(tput colors) in
256)
- export PROMPT_OK_COLOUR="1;38;5;34"
- export PROMPT_FAILED_COLOUR="1;38;5;160"
- export GIT_COLOUR="0;38;5;33"
- export SVN_COLOUR="0;38;5;127"
- export P4_COLOUR="0;38;5;142"
+ PROMPT_OK_COLOUR="1;38;5;34"
+ PROMPT_FAILED_COLOUR="1;38;5;160"
+ GIT_COLOUR="0;38;5;33"
+ SVN_COLOUR="0;38;5;127"
+ P4_COLOUR="0;38;5;142"
;;
88)
- export PROMPT_OK_COLOUR="1;38;5;24"
- export PROMPT_FAILED_COLOUR="1;38;5;48"
- export GIT_COLOUR="0;38;5;23"
- export SVN_COLOUR="0;38;5;49"
- export P4_COLOUR="0;38;5;56"
+ PROMPT_OK_COLOUR="1;38;5;24"
+ PROMPT_FAILED_COLOUR="1;38;5;48"
+ GIT_COLOUR="0;38;5;23"
+ SVN_COLOUR="0;38;5;49"
+ P4_COLOUR="0;38;5;56"
;;
*)
- export PROMPT_OK_COLOUR="1;32"
- export PROMPT_FAILED_COLOUR="1;31"
- export GIT_COLOUR="0;36"
- export SVN_COLOUR="0;35"
- export P4_COLOUR="0;33"
+ PROMPT_OK_COLOUR="1;32"
+ PROMPT_FAILED_COLOUR="1;31"
+ GIT_COLOUR="0;36"
+ SVN_COLOUR="0;35"
+ P4_COLOUR="0;33"
;;
esac
# Default __ps1_user to 1.
[ -z "$__ps1_user" ] && __ps1_user=1
- export PS1='$(__ps1_user $? \u@)\[\033[$(__ps1_col $? 2>/dev/null)m\]$(__ps1_user $? \h)\[\033[$(__ps1_colour_escape $? $GIT_COLOUR)m\]$(__ps1_git $? 2>/dev/null)\[\033[0m\]\[\033[$(__ps1_colour_escape $? $P4_COLOUR)m\]$(__ps1_p4 $? 2>/dev/null)\[\033[0m\]\[\033[$(__ps1_colour_escape $? $SVN_COLOUR)m\]$(__ps1_svn $? 2>/dev/null)\[\033[0m\]$(__ps1_ret $? 2>/dev/null):\w\$ '
+ PS1='$(__ps1_user $? \u@)\[\033[$(__ps1_col $? 2>/dev/null)m\]$(__ps1_user $? \h)\[\033[$(__ps1_colour_escape $? $GIT_COLOUR)m\]$(__ps1_git $? 2>/dev/null)\[\033[0m\]\[\033[$(__ps1_colour_escape $? $P4_COLOUR)m\]$(__ps1_p4 $? 2>/dev/null)\[\033[0m\]\[\033[$(__ps1_colour_escape $? $SVN_COLOUR)m\]$(__ps1_svn $? 2>/dev/null)\[\033[0m\]$(__ps1_ret $? 2>/dev/null):\w\$ '
return 0
}