From eeea080dd9f5af1d235157f009e122ee9cfc3762 Mon Sep 17 00:00:00 2001 From: David Thurstenson Date: Sat, 5 Jun 2021 19:59:17 -0500 Subject: [PATCH] Bashrc.wiki: Added triumph section --- Bashrc.wiki | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Bashrc.wiki b/Bashrc.wiki index 8ac32d1..88ebf0e 100644 --- a/Bashrc.wiki +++ b/Bashrc.wiki @@ -206,6 +206,18 @@ Both of these in tandem make beep tune writing way easier. ---- +== Triumph == + +https://git.thurstylark.com/vcsh/bashrc.git/tree/.bashrc.d/triumph.bash + +This function is both an example of how `sing()` is used, as well as a tool in its own right. + +I wanted a script that played a tune after a long-running script, but play different tunes based on the exit code of the preceding command. This was my cute Portal-themed implementation of that idea. + +Proper tune selection depends on `triumph()` being able to read the exit code from the previous command. For example, for usage in a one-liner script, use something similar to `; triumph`. Avoid using `||` or `&&` in place of the `;`. + +---- + ==Weechat== https://git.thurstylark.com/vcsh/bashrc.git/tree/.bashrc.d/weechat.bash