mirror of
https://github.com/itme-brain/nixos.git
synced 2026-03-24 00:29:43 -04:00
Added comment
This commit is contained in:
parent
27b054baa2
commit
6046acb322
1 changed files with 20 additions and 19 deletions
|
|
@ -6,17 +6,18 @@
|
||||||
export EDITOR=nvim
|
export EDITOR=nvim
|
||||||
|
|
||||||
|
|
||||||
# Check if the current shell is an SSH session
|
# Check if the current shell is an SSH session
|
||||||
is_ssh_session() {
|
is_ssh_session() {
|
||||||
if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then
|
if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then
|
||||||
return 0
|
return 0
|
||||||
else
|
else
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# PS1 Config
|
#TODO: Change ps1 to project root in nix shells
|
||||||
function set_ps1_prompt() {
|
# PS1 Config
|
||||||
|
function set_ps1_prompt() {
|
||||||
if [ -n "${IN_NIX_SHELL:+x}" ]; then
|
if [ -n "${IN_NIX_SHELL:+x}" ]; then
|
||||||
PS1="\[\033[01;34m\]\w\[\033[00m\]\n\[\033[01;32m\]nixShell > \[\033[00m\]"
|
PS1="\[\033[01;34m\]\w\[\033[00m\]\n\[\033[01;32m\]nixShell > \[\033[00m\]"
|
||||||
else
|
else
|
||||||
|
|
@ -26,8 +27,8 @@ export EDITOR=nvim
|
||||||
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
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
PROMPT_COMMAND="set_ps1_prompt; $PROMPT_COMMAND"
|
PROMPT_COMMAND="set_ps1_prompt; $PROMPT_COMMAND"
|
||||||
|
|
||||||
# Locate and source the bash-completion scripts
|
# Locate and source the bash-completion scripts
|
||||||
bash_completion_dir="$HOME/.nix-profiles/share/bash-completion/completions"
|
bash_completion_dir="$HOME/.nix-profiles/share/bash-completion/completions"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue