ref: 88ab2978b63f3de29994685a168a1606b8b62e28
dir: /changeblog/1594885496.ht/
<article> <header> <h2>lib/profile quick hack</h2> <b>Thu, 16 Jul 2020 09:44:56 +0200</b> </header> <p style="margin-top: 0; margin-bottom: 0.50in"></p> <p style="margin-top: 0; margin-bottom: 0.21in"></p> <p style="line-height: 1.4em; margin-left: 1.00in; text-indent: 0.00in; margin-right: 1.00in; margin-top: 0; margin-bottom: 0; text-align: center;"> <span style="font-size: 12pt"><b>lib/profile quick hack</b></span></p> <p style="margin-top: 0; margin-bottom: 0.21in"></p> <p style="margin-top: 0; margin-bottom: 0.21in"></p> <p style="margin-top: 0; margin-bottom: 0.42in"></p> <p style="margin-top: 0; margin-bottom: 0.21in"></p> <p style="margin-top: 0; margin-bottom: 0.05in"></p> <p style="margin-top: 0; margin-bottom: 0.50in"></p> <p style="line-height: 1.2em; margin-left: 1.00in; text-indent: 0.00in; margin-right: 1.00in; margin-top: 0; margin-bottom: 0; text-align: justify;"> <span style="font-size: 10pt">Some smaller change that can change your life. </span></p><p style="margin-top: 0; margin-bottom: 0.05in"></p> <p style="line-height: 1.2em; margin-left: 1.00in; text-indent: 0.00in; margin-right: 1.00in; margin-top: 0; margin-bottom: 0; text-align: justify;"> <span style="font-size: 10pt">There are reasons why you not run </span><span style="font-size: 10pt"><i>rio</i></span><span style="font-size: 10pt"> in your lib/profile. For me the main reason would be: You can no longer use commands</span><span style="font-size: 10pt"><tt>rcpu</tt></span><span style="font-size: 10pt">-c in your shell. Rio opens and there you are, stuck in front of a gray background. </span></p><p style="margin-top: 0; margin-bottom: 0.05in"></p> <p style="line-height: 1.2em; margin-left: 1.00in; text-indent: 0.00in; margin-right: 1.00in; margin-top: 0; margin-bottom: 0; text-align: justify;"> <span style="font-size: 10pt">My solution: </span></p><p style="margin-top: 0; margin-bottom: 0.05in"></p> <p style="line-height: 1.2em; margin-left: 1.35in; text-indent: 0.00in; margin-right: 1.00in; margin-top: 0; margin-bottom: 0; text-align: justify;"> <span style="font-size: 10pt"><tt>case cpu </tt></span></p><p style="line-height: 1.2em; margin-left: 1.35in; text-indent: 0.00in; margin-right: 1.00in; margin-top: 0; margin-bottom: 0; text-align: justify;"> <span style="font-size: 10pt"><tt> # … lots of stuff … </tt></span></p><p style="line-height: 1.2em; margin-left: 1.35in; text-indent: 0.00in; margin-right: 1.00in; margin-top: 0; margin-bottom: 0; text-align: justify;"> <span style="font-size: 10pt"><tt> rcpucmd=‘{cat /mnt/term/env/cmd >[2]/dev/null} </tt></span></p><p style="line-height: 1.2em; margin-left: 1.35in; text-indent: 0.00in; margin-right: 1.00in; margin-top: 0; margin-bottom: 0; text-align: justify;"> <span style="font-size: 10pt"><tt> if(~ $#rcpucmd 0) </tt></span></p><p style="line-height: 1.2em; margin-left: 1.35in; text-indent: 0.00in; margin-right: 1.00in; margin-top: 0; margin-bottom: 0; text-align: justify;"> <span style="font-size: 10pt"><tt> rio </tt></span></p><p style="line-height: 1.2em; margin-left: 1.35in; text-indent: 0.00in; margin-right: 1.00in; margin-top: 0; margin-bottom: 0; text-align: justify;"> <span style="font-size: 10pt"><tt> # … lots of stuff … </tt></span></p><p style="margin-top: 0; margin-bottom: 0.05in"></p> <p style="line-height: 1.2em; margin-left: 1.00in; text-indent: 0.00in; margin-right: 1.00in; margin-top: 0; margin-bottom: 0; text-align: justify;"> <span style="font-size: 10pt">Now I can </span><span style="font-size: 10pt"><i>rcpu</i></span><span style="font-size: 10pt"> and have my rio, or </span><span style="font-size: 10pt"><i>rcpu -c command</i></span><span style="font-size: 10pt"> and run the command without leaving my shell. </span></p><p style="margin-top: 0; margin-bottom: 0.50in"></p> </article>