diff options
author | Amin Bandali <bandali@gnu.org> | 2019-04-14 00:52:31 -0400 |
---|---|---|
committer | Amin Bandali <bandali@gnu.org> | 2019-04-14 00:52:31 -0400 |
commit | 6e7c85a844b1e38dc6c2af476d2fd4e850c04bfd (patch) | |
tree | 9605cfe5f77da3499c3812b5383d062adf0930ea | |
parent | dc9a8087274fa7dd52a83993fbe52d412e9739df (diff) | |
download | configs-6e7c85a844b1e38dc6c2af476d2fd4e850c04bfd.tar.gz configs-6e7c85a844b1e38dc6c2af476d2fd4e850c04bfd.tar.xz configs-6e7c85a844b1e38dc6c2af476d2fd4e850c04bfd.zip |
bash: fish-like prompt
-rw-r--r-- | .bashrc | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -3,7 +3,6 @@ # aliases alias ls='ls --color=auto' -PS1='[\u@\h \W]\$ ' alias mpv="mpv --ytdl-format mp4" alias mv="mv -iv" alias cp="cp -iv" @@ -22,3 +21,8 @@ aur() { # echo -e "\033[5 q" # blinking echo -e "\033[6 q" # non-blinking +a_prompt() { + cwd=$(pwd | sed -e "s!$HOME!~!" | sed -re "s!([^/])[^/]+/!\1/!g") + printf $cwd +} +PS1="\u@\h \$(a_prompt)> " |