freebsd-tips: Add a shell function for laptops

MFC after:		3 days
Reviewed by:		pauamma_gundo.com
Differential Revision:	https://reviews.freebsd.org/D53748
This commit is contained in:
Alexander Ziaee 2025-11-14 09:40:44 -05:00
parent 6a9452c837
commit 42d9ae4945
No known key found for this signature in database
GPG key ID: 0A8F850BCDEF4511

View file

@ -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>
%