themes/agnoster: lint

pull/1947/head
John D Pell 2021-09-14 15:53:23 -07:00
parent 18c7e72ff5
commit 3f6ea607b5
1 changed files with 2 additions and 1 deletions

View File

@ -1,4 +1,5 @@
# shellcheck shell=bash # shellcheck shell=bash
# shellcheck disable=SC2034 # Expected behavior for themes.
# vim: ft=bash ts=2 sw=2 sts=2 # vim: ft=bash ts=2 sw=2 sts=2
# #
# agnoster's Theme - https://gist.github.com/3712874 # agnoster's Theme - https://gist.github.com/3712874
@ -220,7 +221,7 @@ prompt_virtualenv() {
# Context: user@hostname (who am I and where am I) # Context: user@hostname (who am I and where am I)
prompt_context() { prompt_context() {
local user=$(whoami) local user="${USER:-${LOGNAME:?}}"
if [[ $user != "$DEFAULT_USER" || -n $SSH_CLIENT ]]; then if [[ $user != "$DEFAULT_USER" || -n $SSH_CLIENT ]]; then
prompt_segment black default "$user@\h" prompt_segment black default "$user@\h"