Добавлены модули общего назначения
This commit is contained in:
parent
043c0b91f6
commit
e753c86eb9
8 changed files with 63 additions and 15 deletions
19
source/app.d
19
source/app.d
|
@ -7,24 +7,31 @@ private string programName = "d-examples";
|
|||
int main(string[] args)
|
||||
{
|
||||
auto argumets = new Program(programName, examplesVersion)
|
||||
.add(new Command("shell", "Запуск команд в shell")
|
||||
.add(new Command("pipe", "Чтение выходных данных на примере ip"))
|
||||
.add(new Command("spinner", "Эмуляция статуса выполнения процесса"))
|
||||
.add(new Command("common", "Общего назначения")
|
||||
.add(new Command("isexists",
|
||||
"Проверяет наличие исполняемого файла в директориях,указанных в переменной окружения PATH"))
|
||||
)
|
||||
.add(new Command("ncurses", "Использование библиотеки ncurses")
|
||||
.add(new Command("menu", "Интерактивное консольное меню"))
|
||||
.add(new Command("password", "Консольное окно для ввода пароля"))
|
||||
)
|
||||
.add(new Command("shell", "Запуск команд в shell")
|
||||
.add(new Command("pipe", "Чтение выходных данных на примере ip"))
|
||||
.add(new Command("spinner", "Эмуляция статуса выполнения процесса"))
|
||||
)
|
||||
.parse(args);
|
||||
|
||||
argumets
|
||||
.on("shell", (shell) { shell
|
||||
.on("pipe", (pipe) { pipeShell(); })
|
||||
.on("spinner", (loading) { spinnerShell(); });
|
||||
.on("common", (common) { common
|
||||
.on("isexists", (isexists) { isExists(); });
|
||||
})
|
||||
.on("ncurses", (ncurses) { ncurses
|
||||
.on("menu", (items) { menuNcurses(); })
|
||||
.on("password", (password) { passwordNcurses(); });
|
||||
})
|
||||
.on("shell", (shell) { shell
|
||||
.on("pipe", (pipe) { pipeShell(); })
|
||||
.on("spinner", (loading) { spinnerShell(); });
|
||||
});
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue