History log of /haiku/src/apps/terminal/Shell.h
Revision Date Author Comments
# 19bfeaa7 24-Mar-2013 Siarzhuk Zharski <zharik@gmx.li>

Support %e (cur.encoding) for Terminal titles

Optional parameter %e to indicate current tab view encoding in the
window title. It is not shown in case tab view encoding is default
UTF-8. Inspired by Sergei Reznikov. Thanks.


# ca598670 22-Nov-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

* Removed the shell process ID from ActiveProcessInfo and moved it to new class
ShellInfo, which also contains a flag whether the shell is the default shell.
* If the Terminal has been started with a custom shell, also replace "%p" in
the title by its name, when active.
* Also show the on-close alert for the custom shell.

Fixes #6844.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39573 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 37322c4b 16-Nov-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added new class ShellParameters that bundles all parameters passed to the
shell.
* Also added a parameter for the current working directory and. If supplied,
it is applied in Shell::_Spawn().
* Pass the current working directory of the active tab when opening a new
tab. Implements part of #6712.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39457 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b27862d2 16-Nov-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Reverted r39451. Instead introduced new class ActiveProcessInfo and added
method GetActiveProcessInfo() to Shell and TermView to get such an info for
the current foreground process group leader. Currently the info only contains
the ID, name, and current directory of the process.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39455 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5a76a2c1 16-Nov-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Added ActiveProcessGroup() getter to Shell and TermView.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39451 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ad827632 16-Nov-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Style cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39450 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d9fdb4f6 20-Jul-2010 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Added Shell::HasActiveProcesses() and TermView::IsShellBusy() (which calls
the former) to tell if some process launched from the terminal is still
running. Some style fix in Shell.h, made a parameter const.
Added basic TermWindow::QuitRequested()


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37631 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9f7a3e34 04-Jan-2010 Stefano Ceccherini <stefano.ceccherini@gmail.com>

fAttached was never set in Shell::AttachBuffer(), and that caused
TermParse::StopThreads() in Shell::DetachBuffer() to be never called.
Moved initialization of termios struct to its own functions.
Added const to some methods.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34893 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8c6aa65e 19-Dec-2009 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Implemented input method handling. Unfortunately, due to bug #4926, it's
completely unusable (it's disabled currently anyway).
Shell::AttachBuffer() returns a status_t now (instead of void), so the caller
can do something in case it fails.
Simplified some methods, removed unused stuff.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34707 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4012c75a 21-Feb-2009 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Remove TermView dependency from Shell. It now depends on TerminalBuffer instead.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29273 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4386ce02 03-Jun-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Pulled the TermView interface used by TermParse into a new interface
class TerminalBuffer, which will evolve into a TermBuffer replacement
and decouple the parse thread from the window.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25787 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 901e5756 10-May-2008 François Revol <revol@free.fr>

Indeed we don't need this signal hack for BeOS, we just need to tell it the pgid. That reduces the number of things to remove later ;)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25411 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 156c7443 09-May-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

The terminal is not supposed to send signals to the shell. That's done
by the tty. Now I also understand the BeOS work-around to ignore SIGINT
in bash I removed recently.
I suppose the signal code is still needed for BeOS. If not please remove
it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25403 a95241bf-73f2-0310-859d-f6bbb57e9c96


# dbc03773 28-Aug-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Added a SIGCHLD handler, so that the terminal will notice when one of
its shells has been terminated. Usually the thread reading from the tty
master would notice when all slaves have been closed, but they won't be
closed when the shell started a background job that's still living.

Unfortunately there are race conditions in the terminal that can lead to
deadlock when a session is closed. The service threads usually happily
lock the window, while the (locked) window would wait for the service
threads to quit.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22100 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bb4632f1 16-Aug-2007 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Stolen Ingo's Arguments class from Miniterminal and used it in place of
GPL'd code in TermApp (slightly modified, and bugfixed, even :P).
TermView now accepts an argument vector instead of a commandline. Same
thing for Shell.
Temporarily(?) removed some commandline options.
This also fixes bug #1396 (tested)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21979 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2b87a97a 03-Aug-2007 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Attach/DetachShell are now private. Added a new TermView constructor
which only specifies the rows and columns, view size is automatically
calculated, and used it in TermWindow. Added a TermView::SetTitle()
method, thus TermParse doesn't call Window() anymore. Some cleanups,
scrollbar was off by one.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21808 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 258e9494 27-Jul-2007 Stefano Ceccherini <stefano.ceccherini@gmail.com>

More work towards a tabbed terminal. Actually it already somewhat works
(code not enabled, though). Moved scripting from TermWindow to
TermView. Added a SmartTabView which (for now) only resizes the
child views to fit their size. Usual cleanups.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21723 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 17dfb8b1 26-Jul-2007 Stefano Ceccherini <stefano.ceccherini@gmail.com>

More headers cleanup


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21706 a95241bf-73f2-0310-859d-f6bbb57e9c96


# abc47202 23-Jul-2007 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Moved cursor blinking functionality from TermParse into TermView (and
from a BMessageRunner into Pulse()). Removed more unused stuff.
Moved around some constants and definitions. Many style changes. Sorry,
I know the two should be separated, but I had already done so many changes...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21695 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ac3a8f54 21-Jul-2007 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Made all CodeConv methods static, since there was no point for them to
be nonstatic. Moved TermParse under Shell, Removed some parameters
passing around from TermWindow/TermView/TermParse. Now TermParse threads are
started when the shell is attached to a TermView. Might still be
improved.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21680 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0d32d905 21-Jul-2007 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Minor cleanup, Updated some copyrights


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21677 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 37b209af 17-Jul-2007 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Renamed spawn.cpp/h to Shell.cpp/h and updated the other source files to
take this change into account


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21629 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 19bfeaa78642fedb092eeaea7bab826753f39bd5 24-Mar-2013 Siarzhuk Zharski <zharik@gmx.li>

Support %e (cur.encoding) for Terminal titles

Optional parameter %e to indicate current tab view encoding in the
window title. It is not shown in case tab view encoding is default
UTF-8. Inspired by Sergei Reznikov. Thanks.


# ca598670fb927e196eb2a5ab90fa03bfb5dac0a2 22-Nov-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

* Removed the shell process ID from ActiveProcessInfo and moved it to new class
ShellInfo, which also contains a flag whether the shell is the default shell.
* If the Terminal has been started with a custom shell, also replace "%p" in
the title by its name, when active.
* Also show the on-close alert for the custom shell.

Fixes #6844.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39573 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 37322c4b52e4d9922fb1c7289a3f0d129ab1841b 16-Nov-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added new class ShellParameters that bundles all parameters passed to the
shell.
* Also added a parameter for the current working directory and. If supplied,
it is applied in Shell::_Spawn().
* Pass the current working directory of the active tab when opening a new
tab. Implements part of #6712.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39457 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b27862d236b20483e88aa24aa8e2d8fed2e00907 16-Nov-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Reverted r39451. Instead introduced new class ActiveProcessInfo and added
method GetActiveProcessInfo() to Shell and TermView to get such an info for
the current foreground process group leader. Currently the info only contains
the ID, name, and current directory of the process.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39455 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5a76a2c142ef0d79e2fb944a76a213921992a035 16-Nov-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Added ActiveProcessGroup() getter to Shell and TermView.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39451 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ad8276321c8a2402395ba3efc01877765320d4b7 16-Nov-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Style cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39450 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d9fdb4f6cdba4e444b19404e3d4dfe1c86b2f575 20-Jul-2010 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Added Shell::HasActiveProcesses() and TermView::IsShellBusy() (which calls
the former) to tell if some process launched from the terminal is still
running. Some style fix in Shell.h, made a parameter const.
Added basic TermWindow::QuitRequested()


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37631 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9f7a3e34060ca7626221d243826f7d9595cd77c3 04-Jan-2010 Stefano Ceccherini <stefano.ceccherini@gmail.com>

fAttached was never set in Shell::AttachBuffer(), and that caused
TermParse::StopThreads() in Shell::DetachBuffer() to be never called.
Moved initialization of termios struct to its own functions.
Added const to some methods.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34893 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8c6aa65eb6a967af6ade9abeee7c961ff84005c7 19-Dec-2009 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Implemented input method handling. Unfortunately, due to bug #4926, it's
completely unusable (it's disabled currently anyway).
Shell::AttachBuffer() returns a status_t now (instead of void), so the caller
can do something in case it fails.
Simplified some methods, removed unused stuff.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34707 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4012c75a866fa77d21c6556b75417811d883be60 21-Feb-2009 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Remove TermView dependency from Shell. It now depends on TerminalBuffer instead.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29273 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4386ce0206df74a06409dc1d5ebb0db3596c1e5c 03-Jun-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Pulled the TermView interface used by TermParse into a new interface
class TerminalBuffer, which will evolve into a TermBuffer replacement
and decouple the parse thread from the window.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25787 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 901e5756cba6cbc992b71815892d9635d32a490b 10-May-2008 François Revol <revol@free.fr>

Indeed we don't need this signal hack for BeOS, we just need to tell it the pgid. That reduces the number of things to remove later ;)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25411 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 156c7443359530266cca0871892653e278981c3d 09-May-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

The terminal is not supposed to send signals to the shell. That's done
by the tty. Now I also understand the BeOS work-around to ignore SIGINT
in bash I removed recently.
I suppose the signal code is still needed for BeOS. If not please remove
it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25403 a95241bf-73f2-0310-859d-f6bbb57e9c96


# dbc03773ef3b00c0daf4f4cdd8871f0a4072d094 28-Aug-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Added a SIGCHLD handler, so that the terminal will notice when one of
its shells has been terminated. Usually the thread reading from the tty
master would notice when all slaves have been closed, but they won't be
closed when the shell started a background job that's still living.

Unfortunately there are race conditions in the terminal that can lead to
deadlock when a session is closed. The service threads usually happily
lock the window, while the (locked) window would wait for the service
threads to quit.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22100 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bb4632f1ecfa5b77c87683e446ff7db70c636baf 16-Aug-2007 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Stolen Ingo's Arguments class from Miniterminal and used it in place of
GPL'd code in TermApp (slightly modified, and bugfixed, even :P).
TermView now accepts an argument vector instead of a commandline. Same
thing for Shell.
Temporarily(?) removed some commandline options.
This also fixes bug #1396 (tested)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21979 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2b87a97ac6932e3421e0a8a071a7d31f00ec9c73 03-Aug-2007 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Attach/DetachShell are now private. Added a new TermView constructor
which only specifies the rows and columns, view size is automatically
calculated, and used it in TermWindow. Added a TermView::SetTitle()
method, thus TermParse doesn't call Window() anymore. Some cleanups,
scrollbar was off by one.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21808 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 258e949475ef1971cc5560dd0715f7199123e7a4 27-Jul-2007 Stefano Ceccherini <stefano.ceccherini@gmail.com>

More work towards a tabbed terminal. Actually it already somewhat works
(code not enabled, though). Moved scripting from TermWindow to
TermView. Added a SmartTabView which (for now) only resizes the
child views to fit their size. Usual cleanups.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21723 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 17dfb8b1cb676292928973a7690c277a9875d5c9 26-Jul-2007 Stefano Ceccherini <stefano.ceccherini@gmail.com>

More headers cleanup


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21706 a95241bf-73f2-0310-859d-f6bbb57e9c96


# abc4720231b10f87fa94d5d1e47d18650cf457de 23-Jul-2007 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Moved cursor blinking functionality from TermParse into TermView (and
from a BMessageRunner into Pulse()). Removed more unused stuff.
Moved around some constants and definitions. Many style changes. Sorry,
I know the two should be separated, but I had already done so many changes...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21695 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ac3a8f54460005262afcdc310481d6ba91ef6ff9 21-Jul-2007 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Made all CodeConv methods static, since there was no point for them to
be nonstatic. Moved TermParse under Shell, Removed some parameters
passing around from TermWindow/TermView/TermParse. Now TermParse threads are
started when the shell is attached to a TermView. Might still be
improved.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21680 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0d32d905e9e0dcc971b842b165a9958c78f8a5aa 21-Jul-2007 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Minor cleanup, Updated some copyrights


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21677 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 37b209af048711485162612411b223ecf1948650 17-Jul-2007 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Renamed spawn.cpp/h to Shell.cpp/h and updated the other source files to
take this change into account


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21629 a95241bf-73f2-0310-859d-f6bbb57e9c96