Skip to contentSkip to conversation

editing a menu entry

DISCUSSION Yoshinori K. Okuji 3 participants 5 messages Sep 14, 2004 – Sep 15, 2004

lore
Share & tools
lore
#0 lore raw

I'd like to hear your opinion about editing a menu entry.

I'm now writing code for editing a menu entry. Unlike GRUB Legacy, I'd like to edit a menu entry directly using GRUB as a screen editor rather than going to a command-line and going back to the menu-like interface. Conceptually, the interface for menu entry editing will behave like a subset of GNU Emacs.

Then, there is a key bind problem. In GRUB Legacy, we use 'b' to boot an entry and use ENTER to edit a specified command. In GRUB 2, these must be used to insert the character 'b' and to insert a newline or split a command into two, respectively. Then, how to boot the entry? I don't know what the right way is. Using an unusual key (such as C-c)? Or, a combination of keys (such as C-x b)?

What do you think?

Okuji

#1 lore raw
Quoted 9 lines

I'd like to hear your opinion about editing a menu entry.

I'm now writing code for editing a menu entry. Unlike GRUB Legacy, I'd like to edit a menu entry directly using GRUB as a screen editor rather than going to a command-line and going back to the menu-like interface. Conceptually, the interface for menu entry editing will behave like a subset of GNU Emacs.

Quoted 8 lines

Then, there is a key bind problem. In GRUB Legacy, we use 'b' to boot an entry and use ENTER to edit a specified command. In GRUB 2, these must be used to insert the character 'b' and to insert a newline or split a command into two, respectively. Then, how to boot the entry? I don't know what the right way is. Using an unusual key (such as C-c)? Or, a combination of keys (such as C-x b)?

What do you think?

I do not know which possibilities there are, but I don't like the key combination stuff.

How is ALT-b?

#2 lore raw
Quoted 1 line · Tobias Wollgam

How is ALT-b?

Alt is difficult to use for GRUB. Control is better.

Okuji

#3 lore raw
In reply to Yoshinori K. Okuji
Quoted 7 lines · Yoshinori K. Okuji

I'd like to hear your opinion about editing a menu entry.

I'm now writing code for editing a menu entry. Unlike GRUB Legacy, I'd like to edit a menu entry directly using GRUB as a screen editor rather than going to a command-line and going back to the menu-like interface. Conceptually, the interface for menu entry editing will behave like a subset of GNU Emacs.

That is nice! Have you thought about using tab completion here?

Quoted 6 lines

Then, there is a key bind problem. In GRUB Legacy, we use 'b' to boot an entry and use ENTER to edit a specified command. In GRUB 2, these must be used to insert the character 'b' and to insert a newline or split a command into two, respectively. Then, how to boot the entry? I don't know what the right way is. Using an unusual key (such as C-c)? Or, a combination of keys (such as C-x b)?

AFAIK emacs has combinations of keys because there are not enough keys for every function. I don't think GRUB will ever have this problem so an unusual key would be the best IMHO. It is easier for users and easier to implement.

Thanks,
Marco

#4 lore raw
Quoted 1 line · Marco Gerards

That is nice! Have you thought about using tab completion here?

Not yet completely. Probably we will want to have a common completion routine shared by menu editing and command-line handling. In the menu interface, I think we can use some different ways to show candidates potentially:

1. Show a list of available things (devices/files/commands) at the bottom of the screen (out of the menu box).

2. Split the menu box temporarily and show a list.

3. Overwrite a list on the menu box with the colors flipped (white background and black foreground) temporarily.

I think 1 and 3 are zsh-like, and 1 and 2 are Emacs-like. 1 is the easiest to implement, but it can show very few candidates at a time.

Quoted 4 lines

AFAIK emacs has combinations of keys because there are not enough keys for every function. I don't think GRUB will ever have this problem so an unusual key would be the best IMHO. It is easier for users and easier to implement.

Actually, we need a key to enter the command-line interface as well as one to boot. So maybe C-c for a command-line and C-x for booting. I don't want to use C-z, C-w or C-q, because the positions are different between QWERTY and AZERTY.

Okuji