p-e-w / finalterm

At last – a modern terminal emulator (NO LONGER MAINTAINED)
http://finalterm.org
GNU General Public License v3.0
3.84k stars 179 forks source link

Semantic file menu not recognizing output correctly. #328

Closed nashley closed 9 years ago

nashley commented 9 years ago

There are some instances where the semantic file menu does not correctly recognize output. For example, it fails to recognize all but the first and last directories when listed under a separate directory, but it recognizes them when they are in the current directory. Notice the lack of color following the first command: screenshot from 2014-08-12 00 18 08

The output of ps aux is also distorted, leaving PIDs with higher values (in my case, above 14051) unmarked. Instead, parts of the command name would (incorrectly) be marked as PIDs, which would subsequently and unsurprisingly fail to run as an argument to ps -lf Example: screenshot from 2014-08-12 00 28 00

p-e-w commented 9 years ago

The ls issue is known, and already marked as a TODO in https://github.com/p-e-w/finalterm/blob/master/data/Termlets/ls#L8. This should be possible to fix before the first stable release, and I have marked this bug as such.

I'm really intrigued about the ps problem, and cannot reproduce it on my system (admittedly, I have no four-digit PIDs though). I have always thought the ps termlet to be the most reliable one, due to its simple logic. Maybe you can look at the termlet's code and get an idea where it goes wrong in your case?

ferki commented 9 years ago

@Vreality: I was also unable to reproduce the ps issue on gentoo yet.

Judging by the code of the ps termlet, can the problem be that it founds the string 'PID' later in the output of ps and not just in the header?

ferki commented 9 years ago

I could reproduce it while running watch echo PID in another window. I think it can be fixed in the ps termlet with only looking for the string 'PID' in the first line of output.

lwandrebeck commented 9 years ago

Hmmmmmm. I’m definitely wondering how that can happen with latest git. PIDs with 1 to 5 digits gets correctly formatted here (having up to 29k pids). Are you running an older version ? Anyway, ps el gets final term stuck, use 100% cpu and gives no output. bash -x output: [lwandrebeck@netbook-home-net ~]$ ps el

works fine under gnome-terminal. Trying to debug it…

nashley commented 9 years ago

@lwandrebeck I'm running the latest version from git, but I am no longer able to reproduce the issue. Instead of a large PID, it may have been special characters in the output that were throwing finalterm off...? If I can reproduce it again, I will be sure to take a full log of all the output so that I can identify the cause.

@ferki That's a good idea, and it may have been the cause of this issue.

p-e-w commented 9 years ago

This (the ps part) is presumably fixed as a side effect of https://github.com/p-e-w/finalterm/pull/340.

ferki commented 9 years ago

Looks like it, at least I can't reproduce this issue anymore :+1: