fix(history): invert history's most and last position

Allows for a more visually stable line.
This commit is contained in:
Johann Dreo 2022-10-18 21:30:05 +02:00
commit ea11df19a2

View file

@ -473,7 +473,7 @@ _lp_dotmatrix_theme_prompt() {
hist_last="${hist_last:0:$hist_max}${DOTMATRIX_HISTORY_LAST_LEN_MARK}"
fi
local hist_most=$(history | tail -n ${DOTMATRIX_HISTORY_MOST_BACK} | awk '{print $4}' | sort | uniq --count | sort --numeric-sort --reverse | head -n 1 | awk '{print $2}')
inline_right="$d${hist_most}$I${hist_last}$b"
inline_right="$d${hist_last}$I${hist_most}$b"
fi
inline_right+="${DOTMATRIX_LINE}"