1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 05:17:35 +00:00

Shell: Make 'editor' a member of Shell, and provide a LibShell

This commit is contained in:
AnotherTest 2020-09-23 09:06:30 +03:30 committed by Andreas Kling
parent e4bda2e1e7
commit b91be8b9fd
5 changed files with 137 additions and 130 deletions

View file

@ -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;
}