mirror of
https://github.com/itme-brain/nixos.git
synced 2026-03-23 16:29:42 -04:00
fixed ps1?
This commit is contained in:
parent
5aa3b13e30
commit
27b054baa2
1 changed files with 10 additions and 7 deletions
|
|
@ -16,15 +16,18 @@ export EDITOR=nvim
|
|||
}
|
||||
|
||||
# PS1 Config
|
||||
if [ -n "${IN_NIX_SHELL:+x}" ]; then
|
||||
PS1="\[\033[01;34m\]\w\[\033[00m\]\n\[\033[01;32m\]nixShell > \[\033[00m\]"
|
||||
else
|
||||
if ! is_ssh_session; then
|
||||
PS1="\n\[\033[01;34m\]\w\[\033[00m\]\n\[\033[01;32m\]> \[\033[00m\]"
|
||||
function set_ps1_prompt() {
|
||||
if [ -n "${IN_NIX_SHELL:+x}" ]; then
|
||||
PS1="\[\033[01;34m\]\w\[\033[00m\]\n\[\033[01;32m\]nixShell > \[\033[00m\]"
|
||||
else
|
||||
PS1="\n\[\033[01;34m\]\w\[\033[00m\]\n\[\033[01;32m\]\u@\h:\[\033[00m\] "
|
||||
if ! is_ssh_session; then
|
||||
PS1="\n\[\033[01;34m\]\w\[\033[00m\]\n\[\033[01;32m\]> \[\033[00m\]"
|
||||
else
|
||||
PS1="\n\[\033[01;34m\]\w\[\033[00m\]\n\[\033[01;32m\]\u@\h:\[\033[00m\] "
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
PROMPT_COMMAND="set_ps1_prompt; $PROMPT_COMMAND"
|
||||
|
||||
# Locate and source the bash-completion scripts
|
||||
bash_completion_dir="$HOME/.nix-profiles/share/bash-completion/completions"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue