Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- export PS1='$( readlink -f . )'
- $ export PS1='$( readlink -f . ) $ '
- /home/danielbeck $ ln -s /etc foo
- /home/danielbeck $ cd foo
- /etc $ _
- /etc $ cd ..
- /home/danielbeck $ _
- function cd {
- if [[ $# -ne 1 ]] ; then
- builtin cd "$@"
- elif [[ "$1" = "-" ]] ; then
- builtin cd -
- else
- builtin cd "$( readlink -f "$1" )"
- fi
- }
- function cd {
- builtin cd "$@"
- builtin cd "$( readlink -f . )"
- }
- if [ "$color_prompt" = yes ]; then
- PS1='${debian_chroot:+($debian_chroot)}[ 33[01;32m]u@h[ 33[00m]:[ 33[01;34m]$(readlink -f w)[ 33[00m]$ ' else
- PS1='${debian_chroot:+($debian_chroot)}u@h:$(readlink -f w)$ ' fi
- unset color_prompt force_color_prompt
- # If this is an xterm set the title to user@host:dir
- case "$TERM" in
- xterm*|rxvt*)
- PS1="[e]0;${debian_chroot:+($debian_chroot)}u@h: $(readlink -f .)a]$PS1"
- ;;
- *)
- ;;
- esac
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement