Permalink
Browse files

Simplified shell rc files

  • Loading branch information...
1 parent 070a687 commit be17997e30cd6d711147965503d9ce4e4af21a77 @muennich committed Aug 7, 2012
Showing with 12 additions and 17 deletions.
  1. +8 −10 .bashrc
  2. +3 −7 .mkshrc
  3. +1 −0 .sh_aliases
View
18 .bashrc
@@ -8,20 +8,18 @@ shopt -s checkwinsize
shopt -s no_empty_cmd_completion
shopt -s histappend
-TERM_DEV="$(tty)"
-TERM_TITLE="$(whoami)@$(hostname):${TERM_DEV#/dev/}"
-
-_prompt_command() {
+prompt_cmd() {
history -a
- case "$TERM" in
- rxvt*|xterm*)
- echo -en "\e]0;$TERM_TITLE\a";;
- esac
}
-PS1='\[\e[1m\]\h:\W \$ \[\e[0m\]'
-PROMPT_COMMAND="_prompt_command"
HISTCONTROL="ignoreboth"
+PROMPT_COMMAND="prompt_cmd"
+PS1='\$ '
+
+case "$TERM" in
+rxvt*|xterm*)
+ PS1="\[\e]0;\u@\h:\w\a\]$PS1";;
+esac
export PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin/core_perl:/usr/bin/perlbin/vendor"
[[ -d "$HOME/bin" ]] && PATH="$HOME/bin:$PATH"
View
10 .mkshrc
@@ -4,21 +4,17 @@
[[ -r $HOME/.gpg-agent-info ]] && . $HOME/.gpg-agent-info
[[ -r $HOME/.ssh-agent-info ]] && . $HOME/.ssh-agent-info
-PROMPT="$(if((USER_ID)); then print \$; else print \#; fi)"
-TERM_DEV="$(tty)"
-TERM_TITLE="$(whoami)@$(hostname):${TERM_DEV#/dev/}"
-
-PS1=$'\1\r\1\e[1m\1'"$(hostname):\${PWD##*/} $PROMPT "$'\1\e[0m\1'
FCEDIT="vim"
HISTFILE="$HOME/.mksh_history"
+PS1="$(if ((USER_ID)); then print \$; else print \#; fi) "
case "$TERM" in
rxvt*|xterm*)
- PS1="$PS1"$'\1\e]0;'"$TERM_TITLE"$'\a\1';;
+ PS1=$'\1\r\1\e]0;'"$(whoami)@$(hostname):\${PWD/\$HOME/~}"$'\a\1'"$PS1";;
esac
export PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin/core_perl:/usr/bin/perlbin/vendor"
-[[ -d "$HOME/bin" ]] && PATH="$HOME/bin:$PATH"
+[ -d "$HOME/bin" ] && PATH="$HOME/bin:$PATH"
export MANPATH="/usr/share/man:/usr/local/share/man:/opt/plan9/share/man"
export LC_COLLATE="C"
export SUDO_PROMPT="[sudo] password for %u:"
View
@@ -1,4 +1,5 @@
alias calc='bc -ql $HOME/.bc'
+alias ed='ed -p :'
alias fucking='sudo'
alias grep='grep --color'
alias hgit='GIT_DIR=$HOME/.dotfiles.git git'

0 comments on commit be17997

Please sign in to comment.