Skip to content

Instantly share code, notes, and snippets.

@technocake
Last active October 21, 2021 11:51
Show Gist options
  • Save technocake/a8b4636e51a068da17982156c246cf56 to your computer and use it in GitHub Desktop.
Save technocake/a8b4636e51a068da17982156c246cf56 to your computer and use it in GitHub Desktop.
goto_prompt.sh
# 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