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