From 8377a506be7999def36c03fc35bafae174704e70 Mon Sep 17 00:00:00 2001 From: Jonathan Hodgson Date: Mon, 23 Aug 2021 15:22:05 +0100 Subject: [PATCH] ZSH: checks for project in prompt --- shells/zsh/includes/promptconfig.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shells/zsh/includes/promptconfig.zsh b/shells/zsh/includes/promptconfig.zsh index 1529e985..8ed5c73f 100644 --- a/shells/zsh/includes/promptconfig.zsh +++ b/shells/zsh/includes/promptconfig.zsh @@ -24,7 +24,7 @@ prompt_dir(){ # Replace wp-content/plugins with plugin icon if in plugin # current_path=$(echo $current_path | sed -r -e "s/wp\-content\/plugins/$wpPluginsIcon/") - current_project_full="$(project current --path)" + current_project_full="$(type -p project > /dev/null && project current --path)" if [ -n "$current_project_full" ]; then if echo "$PWD" | grep -q "$current_project_full"; then current_path=$(echo $PWD | sed -r -e "s#$current_project_full##" | sed -r -e 's/^\///')