You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Amichai Rothman (JIRA)" <ji...@apache.org> on 2018/11/13 14:28:00 UTC

[jira] [Created] (KARAF-6010) grep command fails depending on shell window width

Amichai Rothman created KARAF-6010:
--------------------------------------

             Summary: grep command fails depending on shell window width
                 Key: KARAF-6010
                 URL: https://issues.apache.org/jira/browse/KARAF-6010
             Project: Karaf
          Issue Type: Bug
          Components: karaf
    Affects Versions: 4.2.0
            Reporter: Amichai Rothman


The shell grep command only works on the part of the line that fits inside the current window. If the window is resized to be narrow, any matches outside the current display area are missed.

For example, on a fresh Karaf install with a maximized window, run the shell command:
{quote}bundle:list -t 0 | grep Shell
{quote}
and the output is
{quote}32 │ Active │ 30 │ 4.2.0 │ Apache Karaf :: Shell :: Various Commands
 33 │ Active │ 30 │ 4.2.0 │ Apache Karaf :: Shell :: Core
 34 │ Active │ 30 │ 4.2.0 │ Apache Karaf :: Shell :: SSH
{quote}
Next, resize the width of the karaf shell so that the words 'Shell' in the previous result is cut or partially cut out of the display, and re-run the command. This time, there are no results displayed.

Some on my team were annoyed by this issue for months, not understanding why grep (and custom commands based on it) sometimes work and sometimes not... blamed different OSes and such... when we found out the true cause is window size, it was quite hilarious :)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)