Skip to content

Commit

Permalink
[sh] shellcheck shell rc files
Browse files Browse the repository at this point in the history
  • Loading branch information
mina86 committed Sep 7, 2023
1 parent 25f0ad9 commit 2154541
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions sh/bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,9 @@ else
__PS1+='\w'
fi >/dev/null 2>&1

# `$(($??5:3))` isn’t meant to be expanded
# shellcheck disable=SC2016
__PS1+='\[\e[0;37;44m\]'"$__close"'\[\e[0;1;3$(($??5:3))m\]\$\[\e[0m\] '
__PS1+='\[\e[0;37;44m\]'$__close'\[\e[0;1;3$(($??5:3))m\]\$\[\e[0m\] '

# urxvt-tabbedex has nice handling of bell
# See https://github.com/mina86/urxvt-tabbedex for latest copy
Expand All @@ -71,7 +72,7 @@ esac
# Add title to terminals
__tsl=$(tput tsl 2>/dev/null)
if [ -n "$__tsl" ]; then
__PS1='\['"$__tsl$USER@$host$(tput fsl)"'\]'$__PS1
__PS1='\['$__tsl$USER@$host$(tput fsl)'\]'$__PS1
fi

unset __tsl __close __sp __ellipsis
Expand All @@ -82,6 +83,7 @@ PROMPT_COMMAND='PS1=${__PS1//"{{}}"/"$(eval "$PS1_COMMANDS")"}'
## Show times on the right, behaves a bit like zsh's right prompt, but
## not exactly the same way.
##
__COMMAND_RPROMPT_CACHE_KEY=
__COMMAND_RPROMPT_TIMEZONES='NYC:US/Eastern LON:Europe/London ZRH:Europe/Zurich TOK:Asia/Tokyo'
__command_rprompt() {
local n current
Expand Down
2 changes: 1 addition & 1 deletion sh/shellrc
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ cargo() {

# No need to set environment if it has already been set.
${MINA86RC:+return}
MINA86RC=done
MINA86RC=ok
export MINA86RC

if which nano >/dev/null 2>&1; then
Expand Down

0 comments on commit 2154541

Please sign in to comment.