Re: [Fish-users] writing error messages
On Sun, Aug 20, 2017 at 6:02 AM, Mark Volkmann wrote: > What is the recommended way to write out error messages from a fish > function so they appear in the color that has been configured for error > messages (typically red)? It seems simply writing to stderr is not the > answer. > Glenn's answer works but if you want to ensure you're using whatever color standard fish code uses you should use the `$fish_color_error` variable; e.g., `echo (set_color $fish_color_error)my error message(set_color normal) >&2`. -- Kurtis Rader Caretaker of the exceptional canines Junior and Hank -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Fish-users mailing list Fish-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fish-users
Re: [Fish-users] writing error messages
Perfect! That's what I was looking for. On Sun, Aug 20, 2017 at 5:21 PM, Kurtis Rader wrote: > On Sun, Aug 20, 2017 at 6:02 AM, Mark Volkmann > wrote: > >> What is the recommended way to write out error messages from a fish >> function so they appear in the color that has been configured for error >> messages (typically red)? It seems simply writing to stderr is not the >> answer. >> > > Glenn's answer works but if you want to ensure you're using whatever color > standard fish code uses you should use the `$fish_color_error` variable; > e.g., `echo (set_color $fish_color_error)my error message(set_color normal) > >&2`. > > > -- > Kurtis Rader > Caretaker of the exceptional canines Junior and Hank > -- R. Mark Volkmann Object Computing, Inc. -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Fish-users mailing list Fish-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fish-users
Re: [Fish-users] writing error messages
Use the `set_color` command: $ printf "normal"; set_color red; printf ":ERROR:"; set_color normal; echo normal On Sun, Aug 20, 2017 at 9:02 AM, Mark Volkmann wrote: > What is the recommended way to write out error messages from a fish > function so they appear in the color that has been configured for error > messages (typically red)? It seems simply writing to stderr is not the > answer. > > -- > R. Mark Volkmann > Object Computing, Inc. > > > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > ___ > Fish-users mailing list > Fish-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/fish-users > > -- *Glenn Jackman* Senior Software Developer *Pythian - Love your data* jack...@pythian.com Tel: +1 613 565 8696 Ext. 1478 Mobile: +1 613 808 4984 www.pythian.com -- -- -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Fish-users mailing list Fish-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fish-users
[Fish-users] writing error messages
What is the recommended way to write out error messages from a fish function so they appear in the color that has been configured for error messages (typically red)? It seems simply writing to stderr is not the answer. -- R. Mark Volkmann Object Computing, Inc. -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Fish-users mailing list Fish-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fish-users