<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="http://dev1galaxy.org/extern.php?action=feed&amp;tid=3156&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / the benefits of highlighting console output]]></title>
		<link>http://dev1galaxy.org/viewtopic.php?id=3156</link>
		<description><![CDATA[The most recent posts in the benefits of highlighting console output.]]></description>
		<lastBuildDate>Mon, 30 Mar 2020 04:30:48 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: the benefits of highlighting console output]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=20813#p20813</link>
			<description><![CDATA[<p>hi Altoid</p><p>I am sure Geoff 42 has a better config. I prefer lxterminal but when I use rxvt I have a home config that looks like this.</p><div class="codebox"><pre><code>cat .Xdefaults 
! rxvt
URxvt*background: Black
URxvt*foreground: White
URxvt*geometry: 117x55
URxvt*scrollBar: true
URxvt*rightScrollBar: true

! -- Fonts -- !
URxvt.font:  xft:dejavu DejaVuSans:size=13:antialias=true
URxvt.letterSpace: -1</code></pre></div><p>that is almost max the window on a monitor with 1920x1080</p><p>I stole it from someone else on a different forum.</p><p>hope that helps</p>]]></description>
			<author><![CDATA[dummy@example.com (aus9)]]></author>
			<pubDate>Mon, 30 Mar 2020 04:30:48 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=20813#p20813</guid>
		</item>
		<item>
			<title><![CDATA[Re: the benefits of highlighting console output]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=20810#p20810</link>
			<description><![CDATA[<p>Hello:</p><div class="quotebox"><cite>Altoid wrote:</cite><blockquote><div><p>Is that at all possible?</p></div></blockquote></div><p>Finally found a clue here:<br /><a href="https://askubuntu.com/questions/103913/difference-between-dir-and-ls-terminal-commands" rel="nofollow">https://askubuntu.com/questions/103913/ … l-commands</a></p><p>The solution is within <span class="bbc">~/.bashrc</span>, where you have to edit this section of the script ...</p><div class="codebox"><pre><code># enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
    test -r ~/.dircolors &amp;&amp; eval &quot;$(dircolors -b ~/.dircolors)&quot; || eval &quot;$(dircolors -b)&quot;
    alias ls=&#039;ls --color=auto&#039;
    #alias dir=&#039;dir --color=auto&#039;
    #alias vdir=&#039;vdir --color=auto&#039;

    #alias grep=&#039;grep --color=auto&#039;
    #alias fgrep=&#039;fgrep --color=auto&#039;
    #alias egrep=&#039;egrep --color=auto&#039;
fi</code></pre></div><p>... to get this:</p><div class="codebox"><pre><code># enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
    test -r ~/.dircolors &amp;&amp; eval &quot;$(dircolors -b ~/.dircolors)&quot; || eval &quot;$(dircolors -b)&quot;
    alias ls=&#039;ls --color=always&#039;
    alias dir=&#039;dir --color=always&#039;
    alias vdir=&#039;vdir --color=always&#039;
    alias grep=&#039;grep --color=always&#039;
    alias fgrep=&#039;fgrep --color=always&#039;
    alias egrep=&#039;egrep --color=always&#039;
    alias dmesg=&#039;dmesg --color=always&#039;
fi</code></pre></div><p>Basically what this is does is generate aliases with the <span class="bbc">--color=always</span> modifier.</p><p>From what I have read in the link, it would seem that the <span class="bbc">--color=</span> modifier is hard coded into <span class="bbc">dmesg</span> as well as other utilities.<br />eg: apparently <span class="bbc">dir</span> does not have it but <span class="bbc">ls</span> does. </p><p>Cheers,</p><p>A.</p>]]></description>
			<author><![CDATA[dummy@example.com (Altoid)]]></author>
			<pubDate>Sun, 29 Mar 2020 23:10:17 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=20810#p20810</guid>
		</item>
		<item>
			<title><![CDATA[Re: the benefits of highlighting console output]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=20809#p20809</link>
			<description><![CDATA[<p>Hello:</p><div class="quotebox"><cite>Altoid wrote:</cite><blockquote><div><p>I&#039;ll have a good look at that and see if I can replace <strong>auto</strong> with <strong>always</strong>.</p></div></blockquote></div><p>I have not been able to find out where to change this.</p><p>As I have mentioned, the output of <span class="bbc">dmesg</span> is highlighted but the output of <span class="bbc">dmesg | grep <em>whatever</em></span> is not.</p><p>As expected, <span class="bbc">dmesg --color=always | grep <em>whatever</em></span> <em>is</em> highlighted.</p><p>My reasoning is that there is a script or file <em>somewhere</em> that sets <span class="bbc">dmesg</span> to <span class="bbc">dmesg --color=auto</span>, otherwise the output would be in the default b+w. </p><p>I&#039;ve looked at the <span class="bbc">dmesg</span> and <span class="bbc">terminal-colors.d</span> man files to no avail.</p><p>There are references to <span class="bbc">$XDG_CONFIG_HOME/terminal-colors.d</span> or <span class="bbc">$HOME/.config/terminal-colors.d</span> to override the <span class="bbc">global</span> setting but what I would like to is to <span class="bbc">change</span> the global setting from <span class="bbc">dmesg --color=auto</span> to <span class="bbc">dmesg --color=always</span> for <em>all</em> the cli utilities I use, not only <span class="bbc">dmesg</span>.&#160; eg: <span class="bbc">ls</span>, <span class="bbc">dir</span>, etc.</p><p>It seems that aliases could be generated to do that but I think it would be better to make the change globally.</p><p>Is that at all possible?&#160; </p><p>Thanks in advance,</p><p>A.</p>]]></description>
			<author><![CDATA[dummy@example.com (Altoid)]]></author>
			<pubDate>Sun, 29 Mar 2020 22:05:18 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=20809#p20809</guid>
		</item>
		<item>
			<title><![CDATA[Re: the benefits of highlighting console output]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=20740#p20740</link>
			<description><![CDATA[<p>Hello:</p><div class="quotebox"><cite>Geoff 42 wrote:</cite><blockquote><div><p>The default is <span class="bbc">color=auto</span> according to <span class="bbc">man dmesg</span>.</p></div></blockquote></div><p>Thank you for pointing that out in such a gentle manner.<br />Should know better by now, must make it a point of looking through the <span class="bbc">man</span> files <em>before</em> asking.&#160; =-7</p><div class="quotebox"><cite>Geoff 42 wrote:</cite><blockquote><div><p>... page also has a section on <span class="bbc">COLORS</span> ...</p></div></blockquote></div><p>I&#039;ll have a good look at that and see if I can replace <strong>auto</strong> with <strong>always</strong>.&#160; </p><div class="quotebox"><cite>Geoff 42 wrote:</cite><blockquote><div><p>I use <span class="bbc">rxvt</span> as my terminal and it is able to display colours.</p></div></blockquote></div><p>I&#039;ll check that out also.</p><p>Thanks a lot, you have been very helpful.</p><p>Cheers,</p><p>A.</p>]]></description>
			<author><![CDATA[dummy@example.com (Altoid)]]></author>
			<pubDate>Thu, 26 Mar 2020 10:38:12 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=20740#p20740</guid>
		</item>
		<item>
			<title><![CDATA[Re: the benefits of highlighting console output]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=20738#p20738</link>
			<description><![CDATA[<p>The default is <span class="bbc">color=auto</span> according to <span class="bbc">man dmesg</span>. The man page also has a section on <span class="bbc">COLORS</span> and it apparently also uses settings in <span class="bbc">/etc/terminal-colors.d/dmesg.disable</span>. It refers us to <span class="bbc">man terminal-colors.d</span>. It would appear that it is possible to have some control over what colours are used for different parts of the output.</p><p>I use <span class="bbc">rxvt</span> as my terminal and it is able to display colours.</p><p>Geoff</p>]]></description>
			<author><![CDATA[dummy@example.com (Geoff 42)]]></author>
			<pubDate>Thu, 26 Mar 2020 08:32:47 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=20738#p20738</guid>
		</item>
		<item>
			<title><![CDATA[Re: the benefits of highlighting console output]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=20725#p20725</link>
			<description><![CDATA[<p>Hello:</p><p>Thanks for the prompt reply.</p><div class="quotebox"><cite>Geoff 42 wrote:</cite><blockquote><div><p> ... <span class="bbc">dmesg</span> auto detects whether the output is to the screen or not and turns on colour or not!<br />There is a switch <span class="bbc">--color=[auto|always|never]</span>, so I think what you need is :-</p><div class="codebox"><pre><code>dmesg --color=always | cat</code></pre></div></div></blockquote></div><p>Right ...<br />That works ...</p><p>Using the switch the difference between <span class="bbc">sudo dmesg | grep</span> whatever and <span class="bbc">sudo dmesg --color=always | grep whatever</span> is that the highlighting is turned on.</p><p>Now, <span class="bbc">sudo dmesg</span> is <em>always</em> highlighted but not by my using any switch so I guess there is a setting/place where that switch is applied.</p><p>Where might that setting be?</p><p>Thanks in advance,</p><p>A.</p>]]></description>
			<author><![CDATA[dummy@example.com (Altoid)]]></author>
			<pubDate>Wed, 25 Mar 2020 17:52:31 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=20725#p20725</guid>
		</item>
		<item>
			<title><![CDATA[Re: the benefits of highlighting console output]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=20721#p20721</link>
			<description><![CDATA[<p>I think that <span class="bbc">dmesg</span> auto detects whether the output is to the screen or not and turns on colour or not!<br />There is a switch <span class="bbc">--color=[auto|always|never]</span>, so I think what you need is :-</p><div class="codebox"><pre><code>dmesg --color=always | cat</code></pre></div><p>Geoff</p>]]></description>
			<author><![CDATA[dummy@example.com (Geoff 42)]]></author>
			<pubDate>Wed, 25 Mar 2020 15:51:35 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=20721#p20721</guid>
		</item>
		<item>
			<title><![CDATA[Re: the benefits of highlighting console output]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=20717#p20717</link>
			<description><![CDATA[<p>Hello:</p><p>Sorry for reviving an oldish thread but I just came across your post.<br />These days I seem to have more time to read unanswered posts ....&#160; &#160;=-/</p><p>One of the things I like of how Devuan ascii is implemented is how console output is highlighted at boot time and when using commands such as <span class="bbc">dmesg</span>.<br />Unfortunately, the output of <span class="bbc">dmesg | grep whatever</span> gets written to the terminal without any highlighting.</p><p>Is there a way to fix/change this so that <em>anything</em> printed to the terminal has the same highlighted output/behaves in the same manner, irrespective of whatever comes after the command line instruction?</p><p>It would be nice to have it enabled by default.</p><p>Thanks in advance,</p><p>A.</p>]]></description>
			<author><![CDATA[dummy@example.com (Altoid)]]></author>
			<pubDate>Wed, 25 Mar 2020 14:00:13 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=20717#p20717</guid>
		</item>
		<item>
			<title><![CDATA[the benefits of highlighting console output]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=18553#p18553</link>
			<description><![CDATA[<p>i do a lot of stuff on the command line, and i have a sort of swiss-army-tool with the extras i rely on most. i actually created it to help people learn a bash-like command line in windows, before migrating.</p><p>but the picture here shows the output of find piped to &quot;fsortplus&quot;, one of the tools i use that shows filesize, sha256sums, date/time and full paths.</p><p><span class="postimg"><img src="https://s.put.re/2Dy4vVRZ.png" alt="2Dy4vVRZ.png" /></span></p><p>what im doing is looking for any duplicates of the stylus plugin-- ive found 3.</p><p>there are various ways i can deal with the fact that all the long white-on-black text lines run together, but what i decide to do is just add rainbow -f to the pipeline.</p><p>if i was running the alex shell, i wouldnt need to call it. i could just say | rainbow -f</p><p>but since im running bash instead, i can still call the tool the way shown here.</p><p>the hashsums are trivial to distinguish in yellow. -f means &quot;field&quot; and there are other options for the rainbow command.</p><p>--inksearch is a multi-colour highlighter (not shown) it differs from grep in that it shows not only lines containing the search queries, it shows the surrounding lines. if you want to isolate those lines you can use egrep or isoname.</p><p>so highlight &quot;foo&quot; yellow, &quot;bar&quot; red and &quot;baz&quot; light blue, you would do this:</p><p>| inksearch &quot;foo|bar|baz 14 12 9&quot;</p><p>ordinarily i put all these tools together in one large python script. but if youd like to play with that or if youd like me to isolate either or both of those parts of the script, let me know. i havent included any of the code here, as 1. no one has asked and 2. you may want to write your own highlighter tools instead. but the code is public domain if theres any interest.</p>]]></description>
			<author><![CDATA[dummy@example.com (freemedia2018)]]></author>
			<pubDate>Tue, 19 Nov 2019 01:32:43 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=18553#p18553</guid>
		</item>
	</channel>
</rss>
