gun icon indicating copy to clipboard operation
gun copied to clipboard

gun is meant to be fun and yet... (emojis)

Open LLFourn opened this issue 3 years ago • 3 comments

it doesn't output any emojis. Right now the command logic is full of eprintln. I think we should replace every eprintln with a custom function for the purpose of the message so it can be formatted correctly.

for example, if it's warning the user about something prefix the message with the :warning: emoji would be appropriate. If something worked prefix it with :tada: and so on.

LLFourn avatar Feb 10 '22 08:02 LLFourn

should this be implemented via the fmt::Display trait?

keblek avatar Feb 25 '22 15:02 keblek

@keblek I don't think so. I imagine the easiest way to would be just to create a macro like this:

macro_rules! elog {
    (@warning $($tt:tt)*) => { eprint!("⚠️"); eprintln!($($tt)*);
    (@celebration $($tt:tt)*) => { eprint!("🎉"); eprintln!($($tt)*); };
    // and so on
}

// which you could then use like:

elog!(@celebration "your wallet was set up successfully at {}", path) 

LLFourn avatar Feb 25 '22 22:02 LLFourn

#104

keblek avatar Feb 27 '22 21:02 keblek