Last active
October 21, 2021 11:51
-
-
Save technocake/a8b4636e51a068da17982156c246cf56 to your computer and use it in GitHub Desktop.
goto_prompt.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# add this to your bash rc file | |
# It will display the current goto project that is active. | |
# zsh: add this line: | |
# setopt PROMPT_SUBST | |
prompt_goto() { | |
# Check if project command exist | |
if [ -z "$(command -v project)" ]; then | |
return 0 | |
else | |
if project &> /dev/null; then | |
echo -e "project: $(project)" | |
fi | |
fi | |
} | |
PS1+=" \$(prompt_goto)"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment