Skip to content

Commit 88aee30

Browse files
committed
[Fix sorin-ionescu#762] Use $LOGNAME instead of $USER
$USER is deprecated.
1 parent 4411c95 commit 88aee30

5 files changed

Lines changed: 5 additions & 5 deletions

File tree

modules/completion/init.zsh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ zstyle ':completion:*:(rm|kill|diff):*' ignore-line other
116116
zstyle ':completion:*:rm:*' file-patterns '*:all-files'
117117

118118
# Kill
119-
zstyle ':completion:*:*:*:*:processes' command 'ps -u $USER -o pid,user,command -w'
119+
zstyle ':completion:*:*:*:*:processes' command 'ps -u $LOGNAME -o pid,user,command -w'
120120
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;36=0=01'
121121
zstyle ':completion:*:*:kill:*' menu yes select
122122
zstyle ':completion:*:*:kill:*' force-list always

modules/gpg/init.zsh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ if [[ -z "$GPG_AGENT_INFO" && ! -S "${GNUPGHOME:-$HOME/.gnupg}/S.gpg-agent" ]];
2020
source "$_gpg_agent_env" 2> /dev/null
2121

2222
# Start gpg-agent if not started.
23-
if ! ps -U "$USER" -o pid,ucomm | grep -q -- "${${${(s.:.)GPG_AGENT_INFO}[2]}:--1} gpg-agent"; then
23+
if ! ps -U "$LOGNAME" -o pid,ucomm | grep -q -- "${${${(s.:.)GPG_AGENT_INFO}[2]}:--1} gpg-agent"; then
2424
eval "$(gpg-agent --daemon | tee "$_gpg_agent_env")"
2525
fi
2626
fi

modules/ssh/init.zsh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ if [[ ! -S "$SSH_AUTH_SOCK" ]]; then
2525
source "$_ssh_agent_env" 2> /dev/null
2626

2727
# Start ssh-agent if not started.
28-
if ! ps -U "$USER" -o pid,ucomm | grep -q -- "${SSH_AGENT_PID:--1} ssh-agent"; then
28+
if ! ps -U "$LOGNAME" -o pid,ucomm | grep -q -- "${SSH_AGENT_PID:--1} ssh-agent"; then
2929
eval "$(ssh-agent | sed '/^echo /d' | tee "$_ssh_agent_env")"
3030
fi
3131
fi

modules/utility/init.zsh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,5 +191,5 @@ function find-exec {
191191

192192
# Displays user owned processes status.
193193
function psu {
194-
ps -U "${1:-$USER}" -o 'pid,%cpu,%mem,command' "${(@)argv[2,-1]}"
194+
ps -U "${1:-$LOGNAME}" -o 'pid,%cpu,%mem,command' "${(@)argv[2,-1]}"
195195
}

runcoms/zprofile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ fi
6767
#
6868

6969
if [[ ! -d "$TMPDIR" ]]; then
70-
export TMPDIR="/tmp/$USER"
70+
export TMPDIR="/tmp/$LOGNAME"
7171
mkdir -p -m 700 "$TMPDIR"
7272
fi
7373

0 commit comments

Comments
 (0)