wish/plugins/path.sh

23 lines
482 B
Bash
Raw Normal View History

2019-02-16 08:04:35 +01:00
function wish_path_start() {
return 0
}
function wish_path_end() {
return 0
}
function wish_path_set_colors() {
WISH_PATH_FG=${WISH_PATH_FG:-$WISH_DEFAULT_FG}
WISH_PATH_BG=${WISH_PATH_BG:-$WISH_DEFAULT_BG}
WISH_PATH_NO_WRITE_SUFFIX=${WISH_PATH_NO_WRITE_SUFFIX:-}
2019-02-16 08:04:35 +01:00
}
function wish_path_main() {
if [[ -w $PWD ]]; then
local path=" ${PWD/$HOME/\~} "
else
local path=" ${PWD/$HOME/\~}$WISH_PATH_NO_WRITE_SUFFIX "
fi
wish_append $WISH_PATH_BG $WISH_PATH_FG "$path"
2019-02-16 08:04:35 +01:00
}