Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding problem gitprompt #18

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions lymproblems/gitprompt.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# The user will install bash-git-prompt, following the instructions on
# https://github.com/magicmonty/bash-git-prompt, and then update the `PATH`
# variable in such a way so that `gitprompt.sh` is available.

import os
import sys
from .utils import system, success, fail


def setup():
"Setup gitprompt"
pass # Nothing to do.


def verify():
"Verify gitprompt"
gitprompt = os.path.join(os.environ["HOME"], ".bash-git-prompt/gitprompt.sh")
if not os.path.exists(gitprompt):
fail("Cannot find `gitprompt.sh` in the right location.")
if "GIT_BRANCH" not in os.environ.keys():
fail("Cannot verify that `gitprompt.sh` has been sourced correctly.")

# if everything okay, then
success()