Custom shell in web-ui

Custom shell in web-ui

User can customize command line shell and open it in the web ui.

Open a SHELL on the web ui or run machbase-neo shell on the terminal, and use shell command to add/remove custom shell.

In this example, we are going to show how to add a user-defined shell that invokes /bin/bash (or /bin/zsh) for *nix users and cmd.exe for Windows users. You may add any programming language’s REPL, other database’s command line interface and ssh command that connects to your servers for example.

Add a user-defined shell

On web ui the “SHELL” menu has a special small icon on its top right corner. Click it and it shows “Make a copy” menu.

make-a-copy

Then it makes a new copy in name of “CUSTOM SHELL”. Any copy of “SHELL” has “Edit…” and “Remove” menu.

custom

Click “Edit…” and make some changes.

  • Name: display name. (Any valid text is possible except some reserved words that machbase-neo reserves for the future use)
  • Command: any executable command in full path with arguments
  • Theme : terminal color theme

edit

CLI

The custom shells are managable with machbase-neo shell command line interface.

Add new custom shell

Use shell add <name> <command and args>. You can give a any name and any executable command with arguments, but the default shell name SHELL is reserved.

machbase-neo» shell add bashterm /bin/bash;
added
machbase-neo» shell add terminal /bin/zsh -il;
added
machbase-neo» shell add console C:\Windows\System32\cmd.exe;
added

shell

Show registered shell list

machbase-neo» shell list;
┌────────┬────────────────────────────┬────────────┬──────────────┐
│ ROWNUM │ ID                         │ NAME       │ COMMAND      │
├────────┼────────────────────────────┼────────────┼──────────────┤
1 │ 11F4AFFD-2A9B-4FC5-BB20-637│ BASHTERM   │ /bin/bash    │
2 │ 11F4AFFD-2A9B-4FC5-BB20-638│ TERMINAL   │ /bin/zsh -il │
└────────┴────────────────────────────┴────────────┴──────────────┘

Delete a custom shell

machbase-neo» shell del 11F4AFFD-2A9B-4FC5-BB20-637;
deleted
Last updated on