oh-my-fish/plugins/omf/omf.log.fish

18 lines
385 B
Fish
Raw Normal View History

2015-05-26 21:48:21 +08:00
# NAME
2015-05-31 19:31:55 +08:00
# omf.log - simple log with color
2015-05-26 21:48:21 +08:00
#
# SYNOPSIS
# <string> [<string>...]
#
# DESCRIPTION
# Simply log a message with a specified color.
#
2015-05-31 19:31:55 +08:00
function omf.log -d "Simple log with color"
2015-05-26 21:48:21 +08:00
switch $argv[1]
case '-*'
echo $argv[1] (set_color $argv[2])$argv[3..-1](set_color normal)
case '*'
echo -e (set_color $argv[1])$argv[2..-1](set_color normal)
end
end