summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorAlexander Ziaee <ziaee@FreeBSD.org>2025-11-14 09:40:44 -0500
committerAlexander Ziaee <ziaee@FreeBSD.org>2025-11-14 09:40:53 -0500
commit42d9ae4945f281d12f3ef96cdbd7356e067f8b18 (patch)
tree9aaa81badedb9230da769485ec7f727451425070 /usr.bin
parent6a9452c8378a1aa767708ad2d235f847c880a21c (diff)
freebsd-tips: Add a shell function for laptops
MFC after: 3 days Reviewed by: pauamma_gundo.com Differential Revision: https://reviews.freebsd.org/D53748
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/fortune/datfiles/freebsd-tips8
1 files changed, 8 insertions, 0 deletions
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>
+%