mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:47:46 +00:00
Shell: Make 'editor' a member of Shell, and provide a LibShell
This commit is contained in:
parent
e4bda2e1e7
commit
b91be8b9fd
5 changed files with 137 additions and 130 deletions
|
@ -34,7 +34,6 @@
|
|||
#include <unistd.h>
|
||||
|
||||
extern char** environ;
|
||||
extern RefPtr<Line::Editor> editor;
|
||||
|
||||
int Shell::builtin_alias(int argc, const char** argv)
|
||||
{
|
||||
|
@ -418,8 +417,8 @@ int Shell::builtin_disown(int argc, const char** argv)
|
|||
|
||||
int Shell::builtin_history(int, const char**)
|
||||
{
|
||||
for (size_t i = 0; i < editor->history().size(); ++i) {
|
||||
printf("%6zu %s\n", i, editor->history()[i].characters());
|
||||
for (size_t i = 0; i < m_editor->history().size(); ++i) {
|
||||
printf("%6zu %s\n", i, m_editor->history()[i].characters());
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue