summaryrefslogtreecommitdiff
path: root/util.fish
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-01-17 16:32:26 +1100
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-01-17 16:32:26 +1100
commit2185b60b5842c5f2d87d232cc3dd4546045947a6 (patch)
tree9d0545c57ddd88ae4fd1f8eed814ce272a549907 /util.fish
parentInitial commit (diff)
downloadcaelestia-cli-2185b60b5842c5f2d87d232cc3dd4546045947a6.tar.gz
caelestia-cli-2185b60b5842c5f2d87d232cc3dd4546045947a6.tar.bz2
caelestia-cli-2185b60b5842c5f2d87d232cc3dd4546045947a6.zip
main: message shell
Diffstat (limited to 'util.fish')
-rw-r--r--util.fish20
1 files changed, 9 insertions, 11 deletions
diff --git a/util.fish b/util.fish
index 4fe4444..4b5d981 100644
--- a/util.fish
+++ b/util.fish
@@ -1,20 +1,18 @@
-function log -a text
- set_color cyan
+function _out -a colour -a level -a text
+ set_color $colour
# Pass arguments other than text to echo
- echo $argv[2..] -- ":: $text"
+ echo $argv[4..] -- ":: [$level] $text"
set_color normal
end
+function log -a text
+ _out cyan LOG $text $argv[2..]
+end
+
function warn -a text
- set_color yellow
- # Pass arguments other than text to echo
- echo $argv[2..] -- ":: $text"
- set_color normal
+ _out yellow WARN $text $argv[2..]
end
function error -a text
- set_color red
- # Pass arguments other than text to echo
- echo $argv[2..] -- ":: $text"
- set_color normal
+ _out red ERROR $text $argv[2..]
end