Make shrc work with set -u
This commit is contained in:
parent
64b115d76e
commit
84c00d0562
1 changed files with 6 additions and 6 deletions
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
export ACP_SHRC=1
|
||||
|
||||
if [ "$ZSH_VERSION" ]; then
|
||||
if [ "${ZSH_VERSION-none}" != "none" ]; then
|
||||
emulate sh -c 'source /etc/profile'
|
||||
fi
|
||||
|
||||
|
@ -128,19 +128,19 @@ export POWERSHELL_TELEMETRY_OPTOUT=1
|
|||
export PYTHONWARNINGS="ignore::UserWarning"
|
||||
|
||||
PS1="$ "
|
||||
if test -z "${HOST}"; then
|
||||
if [ "${HOST-invalid}" != "invalid" ]; then
|
||||
HOST="$(hostname 2>/dev/null || cat /etc/hostname)"
|
||||
fi
|
||||
if test $(id -u) -eq 0; then
|
||||
export PS1="${HOST%%.*}# "
|
||||
export PS1="${HOST-localhost%%.*}# "
|
||||
else
|
||||
export PS1="${HOST%%.*}$ "
|
||||
export PS1="${HOST-localhost%%.*}$ "
|
||||
fi
|
||||
if test -x /usr/bin/tty; then
|
||||
export GPG_TTY=$(tty)
|
||||
fi
|
||||
|
||||
if [ "$BASH" ]; then
|
||||
if [ "${BASH-none}" != "none" ]; then
|
||||
HISTCONTROL=ignorespace:ignoredups
|
||||
shopt -s histappend
|
||||
bind '"\e[1;5C": forward-word'
|
||||
|
@ -157,7 +157,7 @@ if [ "$BASH" ]; then
|
|||
fi
|
||||
fi
|
||||
|
||||
if [ "$ZSH_VERSION" ]; then
|
||||
if [ "${ZSH_VERSION-none}" != "none" ]; then
|
||||
# Command history.
|
||||
autoload -Uz compinit && compinit
|
||||
autoload -U history-search-end
|
||||
|
|
Loading…
Reference in a new issue