Commit 8e020731 authored by Jorge Bucaran's avatar Jorge Bucaran

Add msg plugin. The technicolor message printer.

 + Print messages with style and color easily. Supported styles below:

     _text_                 Bold
     __text__               Underline
     ___text___             Bold and Underline
     `$variable`            Apply @<styles> to $variables
     /directory/            Directories
     [url]                  Links
     \n                     Line Break
     \t                     Tab Space

 + Recognizes 256 different color names and special @random @light @dark @error and @success labels.
 + Included also is `msg.ask` to print a message with `msg` and wait for y/n input. Returns true on y\*.
parent d8808471
# Print a message with msg and wait for y/n input. Return true on y\*.
# @params → msg.fish
function msg.ask
msg $argv
head -n 1 | read answer
switch $answer
case y\* Y\*
return 0
case \*
return 1
end
end
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment