Commit 7256c03c authored by Marc Cornellà's avatar Marc Cornellà
Browse files

fishy: fix one-level directory bug and bad array assignment in zsh 5.0.1

parent a7f5170d
# ZSH Theme emulating the Fish shell's default prompt.
_fishy_collapsed_wd() {
local -a pwd=("${(s:/:)PWD/#$HOME/~}")
local i pwd
pwd=("${(s:/:)PWD/#$HOME/~}")
if (( $#pwd > 1 )); then
for i in {1..$(($#pwd-1))}; do
if [[ "$pwd[$i]" = .* ]]; then
pwd[$i]="${${pwd[$i]}[1,2]}"
......@@ -9,6 +11,7 @@ _fishy_collapsed_wd() {
pwd[$i]="${${pwd[$i]}[1]}"
fi
done
fi
echo "${(j:/:)pwd}"
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment