blob: 4c766599cdef7f263fb578204ec41c4a82b00f2d (
plain)
1
2
3
4
|
function prompt_pwd --description "Print the current working directory, shortened to fit the prompt"
set realhome ~
string replace -r '^'"$realhome"'($|/)' '~$1' $PWD | string replace -ar '([^/.])[^/]*/' '$1/'
end
|