Introduction
Introduction Statistics Contact Development Disclaimer Help
add posix man page display - annna - Annna the nice friendly bot.
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6…
Log
Files
Refs
Tags
README
---
commit 045881a05309b02e07b9a0357869a99e1ac610e1
parent 0cb8a1ec6853e1d6ca6edc67fd13b404488e9344
Author: Anders Damsgaard <[email protected]>
Date: Tue, 23 Feb 2021 17:36:21 +0100
add posix man page display
not everyone has posix man pages installed, or wants to access the
opengroup WWW page.
Signed-off-by: Annna Robert-Houdin <[email protected]>
Diffstat:
M annna-start-services | 15 +++++++++++++++
1 file changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/annna-start-services b/annna-start-services
@@ -276,6 +276,21 @@ annna_common() {
annna-say -c "${channel}" "${user}, ${randomoneliner}"
fi
;;
+ "${botname}, posex man "*|"${botname}, posix man "*)
+ exp="$(printf "%s\n" "${text}" | cut -c 18- | sed 's,\t, ,g…
+ chapter=1
+ case "${exp%% *}" in
+ 1|3) chapter="${exp%% *}"; exp="${exp#* }" ;;
+ esac
+ dresult="$(COLUMNS=80 man "${chapter}p" "${exp}")"
+ if [ "$dresult" ];
+ then
+ puri="$(printf "%s" "${dresult}" | /br/bin/bitreich-pa…
+ else
+ puri="No matches found."
+ fi
+ annna-say -c "${channel}" "${puri}"
+ ;;
"${botname}, wolfram is "*)
word="$(printf "%s\n" "${text}" | cut -c 19- | sed 's,\t, ,…
case "$word" in
You are viewing proxied material from bitreich.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.