Skip to content

Commit 38c16ac

Browse files
committed
feat: add htail to print bottom of $HISTFILE
Signed-off-by: Lucas Larson <[email protected]>
1 parent 5e7c463 commit 38c16ac

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

custom/aliases.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5500,6 +5500,12 @@ hw() {
55005500
} 2>/dev/null
55015501
}
55025502

5503+
htail() {
5504+
command -p -- tail -n "$((${LINES:-"$(
5505+
command -p -- tput -- lines 2>/dev/null ||
5506+
command -p -- printf -- '10 + 2'
5507+
)"} - 3))" -- "${HISTFILE?}"
5508+
}
55035509
hundo() {
55045510
## remove the last entry from `$HISTFILE`
55055511

0 commit comments

Comments
 (0)