Fixing up

This commit is contained in:
Bryan Ramos 2023-06-02 12:51:59 -04:00
parent 78fce82d78
commit 93af5ef1c9

View file

@ -34,7 +34,7 @@ function set_ps1_prompt() {
fi fi
# Wrap the branch name and : in braces and color it red # Wrap the branch name and : in braces and color it red
git_branch=" \[\033[01;31m\]{$git_branch}:\[\033[00m\]" git_branch=" \[\033[01;31m\]$git_branch󰘬:\[\033[00m\]"
# Check if flake.nix file exists # Check if flake.nix file exists
if [ -f "$(git rev-parse --show-toplevel)/flake.nix" ]; then if [ -f "$(git rev-parse --show-toplevel)/flake.nix" ]; then
@ -55,10 +55,10 @@ function set_ps1_prompt() {
fi fi
if [ -n "${IN_NIX_SHELL:+x}" ]; then if [ -n "${IN_NIX_SHELL:+x}" ]; then
PS1="$cur_dir\n$flake_icon \[\033[01;32m\]nixShell >$git_branch \[\033[00m\]" PS1="$cur_dir\n$flake_icon \[\033[01;32m\]nixShell>$git_branch\[\033[00m\]"
else else
if ! is_ssh_session; then if ! is_ssh_session; then
PS1="\n$cur_dir\n$flake_icon \[\033[01;32m\]> $git_branch\[\033[00m\]" PS1="\n$cur_dir\n$flake_icon \[\033[01;32m\]>$git_branch\[\033[00m\]"
else else
PS1="\n\[\033[01;34m\]\w\[\033[00m\]\n\[\033[01;32m\]\u@\h:\[\033[00m\] " PS1="\n\[\033[01;34m\]\w\[\033[00m\]\n\[\033[01;32m\]\u@\h:\[\033[00m\] "
fi fi