Skip to content

Commit

Permalink
[Fix sorin-ionescu#762] Use $LOGNAME instead of $USER
Browse files Browse the repository at this point in the history
$USER is deprecated.
  • Loading branch information
sorin-ionescu committed Feb 13, 2015
1 parent 4411c95 commit 88aee30
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion modules/completion/init.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ zstyle ':completion:*:(rm|kill|diff):*' ignore-line other
zstyle ':completion:*:rm:*' file-patterns '*:all-files'

# Kill
zstyle ':completion:*:*:*:*:processes' command 'ps -u $USER -o pid,user,command -w'
zstyle ':completion:*:*:*:*:processes' command 'ps -u $LOGNAME -o pid,user,command -w'
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;36=0=01'
zstyle ':completion:*:*:kill:*' menu yes select
zstyle ':completion:*:*:kill:*' force-list always
Expand Down
2 changes: 1 addition & 1 deletion modules/gpg/init.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ if [[ -z "$GPG_AGENT_INFO" && ! -S "${GNUPGHOME:-$HOME/.gnupg}/S.gpg-agent" ]];
source "$_gpg_agent_env" 2> /dev/null

# Start gpg-agent if not started.
if ! ps -U "$USER" -o pid,ucomm | grep -q -- "${${${(s.:.)GPG_AGENT_INFO}[2]}:--1} gpg-agent"; then
if ! ps -U "$LOGNAME" -o pid,ucomm | grep -q -- "${${${(s.:.)GPG_AGENT_INFO}[2]}:--1} gpg-agent"; then
eval "$(gpg-agent --daemon | tee "$_gpg_agent_env")"
fi
fi
Expand Down
2 changes: 1 addition & 1 deletion modules/ssh/init.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ if [[ ! -S "$SSH_AUTH_SOCK" ]]; then
source "$_ssh_agent_env" 2> /dev/null

# Start ssh-agent if not started.
if ! ps -U "$USER" -o pid,ucomm | grep -q -- "${SSH_AGENT_PID:--1} ssh-agent"; then
if ! ps -U "$LOGNAME" -o pid,ucomm | grep -q -- "${SSH_AGENT_PID:--1} ssh-agent"; then
eval "$(ssh-agent | sed '/^echo /d' | tee "$_ssh_agent_env")"
fi
fi
Expand Down
2 changes: 1 addition & 1 deletion modules/utility/init.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -191,5 +191,5 @@ function find-exec {

# Displays user owned processes status.
function psu {
ps -U "${1:-$USER}" -o 'pid,%cpu,%mem,command' "${(@)argv[2,-1]}"
ps -U "${1:-$LOGNAME}" -o 'pid,%cpu,%mem,command' "${(@)argv[2,-1]}"
}
2 changes: 1 addition & 1 deletion runcoms/zprofile
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ fi
#

if [[ ! -d "$TMPDIR" ]]; then
export TMPDIR="/tmp/$USER"
export TMPDIR="/tmp/$LOGNAME"
mkdir -p -m 700 "$TMPDIR"
fi

Expand Down

0 comments on commit 88aee30

Please sign in to comment.