projects
/
~bandali
/
configs
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dc9a808
)
bash: fish-like prompt
author
Amin Bandali
<bandali@gnu.org>
Sun, 14 Apr 2019 04:52:31 +0000
(
00:52
-0400)
committer
Amin Bandali
<bandali@gnu.org>
Sun, 14 Apr 2019 04:52:31 +0000
(
00:52
-0400)
.bashrc
patch
|
blob
|
blame
|
history
diff --git
a/.bashrc
b/.bashrc
index
04cacb6
..
a2763dc
100644
(file)
--- a/
.bashrc
+++ b/
.bashrc
@@
-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)> "