From 516ca143aa9ce169613442dbf1a88b957a683e5f Mon Sep 17 00:00:00 2001 From: xengineering Date: Tue, 2 Nov 2021 14:11:36 +0100 Subject: Add rand_util() Function to .bashrc --- .bashrc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.bashrc b/.bashrc index b246209..01e951e 100644 --- a/.bashrc +++ b/.bashrc @@ -44,6 +44,12 @@ get_nonzero_retcode() { fi } +# select a random binary from the corutils package and open the manual for it +# works only on Arch Linux +rand_util() { + pacman -Ql coreutils | grep bin | awk '{print $2}' | sed '/^.*\/$/d' | shuf -n 1 - | xargs man +} + PS1='[\e[31m$(get_nonzero_retcode)\e[0m\e[32;1m$(date +"%H:%M:%S")\e[0m \e[35;1m\u@\h\e[0m\e[33;1m$(parse_git_branch)\e[0m \e[36;1m\W\e[0m] $ ' -- cgit v1.2.3-70-g09d2