This commit is contained in:
Bryan Ramos 2023-03-22 00:11:44 -04:00
commit a79fc67d37
647 changed files with 123931 additions and 0 deletions

View file

@ -0,0 +1,23 @@
# Function to check if the current shell is an SSH session
is_ssh_session() {
if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then
return 0
else
return 1
fi
}
# Customizing the PS1 prompt
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
# Locate and source the bash-completion scripts
bash_completion_dir="$HOME/.nix-profiles/share/bash-completion/completions"
if [ -d "$bash_completion_dir" ]; then
for file in "$bash_completion_dir"/*; do
source "$file" 2>/dev/null
done
fi