Improve some of the usability with the terminal....

  • Up arrow brings up previous commands
  • Change to white background so the text is easier to read
  • Bringing up the terminal automatically focuses on the terminal textbox

Comments

robloach’s picture

StatusFileSize
new3.06 KB
snufkin’s picture

StatusFileSize
new3.56 KB

Can we do full history rotation by pressing up/down? Also a resizable terminal would be quite nice (drush help has a nice long list) and page up - page down control for visible history scrolling.

Added in this patch:
- using jquery keydown() fn
- Preventing ` triggering the terminal when focus is on a form

Configurable trigger would be nice as well, like in teleport.

robloach’s picture

Preventing ` triggering the terminal when focus is on a form

I don't really like that. I'd like to be able to close the terminal using the keyboard. Who uses the ` key in a terminal command, anyway?

Can we do full history rotation by pressing up/down?

We could. Currently the history is only local history, it doesn't bring in previous history that you did on other page requests. It's done via a stack currently. So when you make a new command, it adds it to the top of the stack. When you press up, it pops it off the top. To have full up/down history browsing, we'd have to fill in previous history of the user on the page request with Drupal.settings, as well as maintain the history in a full array rather then just a stack.

Also a resizable terminal would be quite nice

I was thinking about that too, but I think we should wait until the project moves to Drupal 7, and the fully replace it with jQuery UI elements. Then the Terminal would be skinnable too, and look much more like the current Drupal theme you're using.

page up - page down control for visible history scrolling

That would be nice! :-)

Do you think we should split these up into different issues? And hit each one one at a time?

iv’s picture

I don't really like that. I'd like to be able to close the terminal using the keyboard. Who uses the ` key in a terminal command, anyway?

Err... those of us that use command substitution?

"exit" seems the traditional way of closing a terminal window, anyway.

snufkin’s picture

Preventing ` triggering the terminal when focus is on a form

I don't really like that. I'd like to be able to close the terminal using the keyboard. Who uses the ` key in a terminal command, anyway?

What i meant there is that if you hit ` while the browser focus is on a form element the terminal wont close, because you might be typing that into a node for instance (think markdown syntax). This doesn't apply to the terminal itself of course, since this project so far doesn't have any use for it.