mirror of
https://github.com/frebib/dotfiles.git
synced 2024-06-14 12:57:23 +00:00
zsh: Simplify fish-like compressed working directory
Works the same, is simpler and less prone to doing the wrong thing, hopefully... Signed-off-by: Joe Groocock <me@frebib.net>
This commit is contained in:
parent
b519b48e83
commit
a48288ad50
@ -1,7 +1,7 @@
|
|||||||
# ZSH Theme emulating the Fish shell's default prompt.
|
# ZSH Theme emulating the Fish shell's default prompt.
|
||||||
|
|
||||||
_fishy_collapsed_wd() {
|
_fishy_collapsed_wd() {
|
||||||
pwd | sed -E 's|^'$HOME'|~|;s|(.*)/|\1%|;s|((^\|/)\.?[^/%]{1})[^/%]*|\1|g;s|(.*)%|\1/|'
|
pwd | sed -E 's|^'$HOME'|~|;s|([\.~]?[^/]{1})[^/]*/|\1/|g'
|
||||||
}
|
}
|
||||||
|
|
||||||
function zle-line-init zle-keymap-select {
|
function zle-line-init zle-keymap-select {
|
||||||
|
Loading…
Reference in New Issue
Block a user