git: f7fd040e3ba9 - releng/15.0 - freebsd-tips: Add a shell function for laptops

From: Colin Percival <cperciva_at_FreeBSD.org>
Date: Sun, 23 Nov 2025 16:39:07 UTC
The branch releng/15.0 has been updated by cperciva:

URL: https://cgit.FreeBSD.org/src/commit/?id=f7fd040e3ba995a84b6fb63b97dc7dd6606602b9

commit f7fd040e3ba995a84b6fb63b97dc7dd6606602b9
Author:     Alexander Ziaee <ziaee@FreeBSD.org>
AuthorDate: 2025-11-14 14:40:44 +0000
Commit:     Colin Percival <cperciva@FreeBSD.org>
CommitDate: 2025-11-23 16:38:38 +0000

    freebsd-tips: Add a shell function for laptops
    
    Approved by:    re (cperciva)
    MFC after:              3 days
    Reviewed by:            pauamma_gundo.com
    Differential Revision:  https://reviews.freebsd.org/D53748
    
    (cherry picked from commit 42d9ae4945f281d12f3ef96cdbd7356e067f8b18)
    (cherry picked from commit f0bb9d28eb3cb29b6e8f2ecd7de4e743dfbebc98)
---
 usr.bin/fortune/datfiles/freebsd-tips | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/usr.bin/fortune/datfiles/freebsd-tips b/usr.bin/fortune/datfiles/freebsd-tips
index 6a2b59ff5fa7..379f772fea88 100644
--- a/usr.bin/fortune/datfiles/freebsd-tips
+++ b/usr.bin/fortune/datfiles/freebsd-tips
@@ -860,3 +860,11 @@ When netstat reports every 8 seconds, it tells traffic in bits per second:
 
 $ netstat -I bge0 8
 %
+Using vt(4) on a laptop? Try this sh(1) function. It provides an "h"
+command that prints the last 22 commands executed, the time, remaining
+battery life, and current working directory:
+
+h() { fc -l -22; printf "%s\n" "`date +%H:%M` -- `apm -l`% -- `pwd`"; }
+
+		-- Alexander Ziaee <ziaee@FreeBSD.org>
+%