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

[DO NOT MERGE} initial zsh support #355

Open detiber opened 9 years ago

detiber commented 9 years ago

Changes introduced:

Outstanding issues:

detiber commented 9 years ago

ls termlet is working as expected, ps termlet is now working as well.

wget termlet updates the status bar when download is initiated and when progress updates, but not when download is cancelled/finished.

history completion is not working at this time as well.

detiber commented 9 years ago

another major oddity right now is that the prompt is inheriting from the shell finalterm is launched from currently and not updating properly.

detiber commented 9 years ago

Improved shell handling a bit, now attempt to consume $SHELL from environment and if supported, then use it otherwise fall back to the default value in Settings.get_default().shell_path

detiber commented 9 years ago

I'm thinking there has got to be a better way to run configure_file on multiple files with cmake, but at least for the time being I'm defaulting to brute forcing it for the Termlet processing. I realized that different platforms might have different paths for the shells, so we should at least try to detect the shell path and set the #!'s appropriately.

detiber commented 9 years ago

I was able to fix up the issue with the wget termlet, but it introduced a crash when hitting at the prompt: \ (finalterm:20996): ERROR **: Highlight regex compilation error: Error while optimizing regular expression ➤ ▶▶▶ 01:59.36 Wed Sep 17 2014 \xe2: internal error: opcode not recognized zsh: trace trap (core dumped) finalterm

haven't had a chance to see if it is related to my zsh config or if it is a general issue yet.

detiber commented 9 years ago

actually, looking at the full output, it looks like my prompt is being interpreted by finalterm, will need to find a way to filter that out:

jdetiber@localhost:~➤ finalterm
** Message: TerminalOutput.vala:386: Command mode entered
** Message: Command updated: ''
** Message: Command updated: '\xa4 
'
** Message: Command updated: '\xa4 
\xe2'
** Message: Command updated: '\xa4 
\xe2'
** Message: Command updated: '\xa4 
\xe2\x96'
** Message: Command updated: '\xa4 
\xe2\x96'
** Message: Command updated: '\xa4 
▶'

...snip...

** Message: Command updated: '\xa4 
▶▶▶ 02:04.56 Wed Sep 17 2014 ◀◀◀                                                
jdetiber@localhost:~'
** Message: Command updated: '\xa4 
▶▶▶ 02:04.56 Wed Sep 17 2014 ◀◀◀                                                
jdetiber@localhost:~\xe2'

** (finalterm:22741): ERROR **: Highlight regex compilation error: Error while optimizing regular expression \xa4 
▶▶▶ 02:04\.56 Wed Sep 17 2014 ◀◀◀                                                
jdetiber@localhost:~\xe2: internal error: opcode not recognized
zsh: trace trap (core dumped)  finalterm
▶▶▶ 02:04.57 Wed Sep 17 2014 ◆ Exit Code: 133 ◀◀◀                                                                    
jdetiber@localhost:~➤ 
p-e-w commented 9 years ago

What exactly is the content of your prompt? Is it

▶▶▶ 02:04.56 Wed Sep 17 2014 ◀◀◀                                                
jdetiber@localhost:~➤

?

detiber commented 9 years ago

It is indeed. But this type of prompt manipulation is common with zsh. I suspect it may just be a matter of escaping the prompt text somehow, but I haven't had a chance to dig into it yet.

harj0 commented 9 years ago

Sorry fur such a newb question, but how can I pull/implement these changes?

Eugene-msc commented 9 years ago

Like this i think git branch zsh git checkout zsh git pull https://github.com/detiber/finalterm zsh2