Advertisement
Guest User

Untitled

a guest
Jun 2nd, 2011
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.30 KB | None | 0 0
  1. chpwd() {
  2.     if [[ "$TERM" == "screen.linux" || "$TERM" == "screen" ]]; then
  3.         echo -ne "\ek"`pwd | grep -o "[^/]*/[^/]*$"`"\e\\"
  4.    fi
  5. }
  6.  
  7. preexec() {
  8.    if [[ "$TERM" == "screen.linux" || "$TERM" == "screen" ]]; then
  9.        echo -ne "\ek"$1"\e\\"
  10.     fi
  11. }
  12.  
  13. precmd() {
  14.     chpwd
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement