* cfdisk's input fields behave awkwardly (in utf8 locale) @ 2015-02-01 14:02 Benno Schulenberg 2015-02-02 12:11 ` Karel Zak 0 siblings, 1 reply; 9+ messages in thread From: Benno Schulenberg @ 2015-02-01 14:02 UTC (permalink / raw) To: Util-Linux Hi, In the current cfdisk, when making a new partition in a free space, the program prompts for the partition size, with a suggested value already filled in and the cursor sitting at the end of that value. If one tries to use the cursor-left key to edit the value, in a utf8 locale this produces the character Ą instead of a bell. (The same happens when cfdisk asks for the name of a script file.) To reproduce: # LC_ALL=en_US.utf8 ./cfdisk Anyway, if the cursor keys would not produce weird characters, and they can't be made to work normally (that is: to go left and right), then the only way to change the suggested value is to use the Backspace key. This is awkward. The older cfdisk, when it prompted for a partition size, would put the cursor at the start of the suggested value, and hitting any other key than Enter would erase this value. That is nice and desirable behaviour. Could that be restored? Also, upon startup the old cfdisk would put the cursor on the menu item "Quit", showing the user the most important thing right at the start: how to get out. This is extra useful when cfdisk is localized to another language where the word for quit doesn't start with a Q. Could this initial menu-item selection be restored? Something quite different: the man page of cfdisk says that it is possible to load an sfdisk-compatible script into cfdisk. But how? Benno -- http://www.fastmail.com - Accessible with your email software or over the web ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: cfdisk's input fields behave awkwardly (in utf8 locale) 2015-02-01 14:02 cfdisk's input fields behave awkwardly (in utf8 locale) Benno Schulenberg @ 2015-02-02 12:11 ` Karel Zak 2015-02-02 12:29 ` Peter Cordes 2015-02-02 20:42 ` Benno Schulenberg 0 siblings, 2 replies; 9+ messages in thread From: Karel Zak @ 2015-02-02 12:11 UTC (permalink / raw) To: Benno Schulenberg; +Cc: Util-Linux On Sun, Feb 01, 2015 at 03:02:06PM +0100, Benno Schulenberg wrote: > To reproduce: # LC_ALL=en_US.utf8 ./cfdisk > > Anyway, if the cursor keys would not produce weird characters, > and they can't be made to work normally (that is: to go left and > right), then the only way to change the suggested value is to use > the Backspace key. This is awkward. The older cfdisk, when it "Fixed" .. I just disable some keys (like left, right...). > prompted for a partition size, would put the cursor at the start > of the suggested value, and hitting any other key than Enter > would erase this value. That is nice and desirable behaviour. > Could that be restored? It would be better to implement full one line editor with support for all basic keys and with ability to insert and erase chars on arbitrary position with in the string... v2.27 :-) > Also, upon startup the old cfdisk would put the cursor on the > menu item "Quit", showing the user the most important thing > right at the start: how to get out. This is extra useful when > cfdisk is localized to another language where the word for quit > doesn't start with a Q. Could this initial menu-item selection > be restored? Fixed. > Something quite different: the man page of cfdisk says that it > is possible to load an sfdisk-compatible script into cfdisk. > But how? "cfdisk --zero" asks for new disk label or for the script. Karel -- Karel Zak <kzak@redhat.com> http://karelzak.blogspot.com ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: cfdisk's input fields behave awkwardly (in utf8 locale) 2015-02-02 12:11 ` Karel Zak @ 2015-02-02 12:29 ` Peter Cordes 2015-02-02 12:37 ` Karel Zak 2015-02-02 20:42 ` Benno Schulenberg 1 sibling, 1 reply; 9+ messages in thread From: Peter Cordes @ 2015-02-02 12:29 UTC (permalink / raw) To: Karel Zak; +Cc: Benno Schulenberg, Util-Linux On Mon, Feb 02, 2015 at 01:11:26PM +0100, Karel Zak wrote: > On Sun, Feb 01, 2015 at 03:02:06PM +0100, Benno Schulenberg wrote: > > [...cfdisk...] > > prompted for a partition size, would put the cursor at the start > > of the suggested value, and hitting any other key than Enter > > would erase this value. That is nice and desirable behaviour. > > Could that be restored? > > It would be better to implement full one line editor with support for > all basic keys and with ability to insert and erase chars on > arbitrary position with in the string... v2.27 :-) Maybe link with GNU readline, to avoid reinventing the wheel. -- #define X(x,y) x##y Peter Cordes ; e-mail: X(peter@cor , des.ca) "The gods confound the man who first found out how to distinguish the hours! Confound him, too, who in this place set up a sundial, to cut and hack my day so wretchedly into small pieces!" -- Plautus, 200 BC ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: cfdisk's input fields behave awkwardly (in utf8 locale) 2015-02-02 12:29 ` Peter Cordes @ 2015-02-02 12:37 ` Karel Zak 2015-02-02 12:46 ` Ingo Brückl ` (2 more replies) 0 siblings, 3 replies; 9+ messages in thread From: Karel Zak @ 2015-02-02 12:37 UTC (permalink / raw) To: Peter Cordes; +Cc: Benno Schulenberg, Util-Linux On Mon, Feb 02, 2015 at 08:29:23AM -0400, Peter Cordes wrote: > On Mon, Feb 02, 2015 at 01:11:26PM +0100, Karel Zak wrote: > > On Sun, Feb 01, 2015 at 03:02:06PM +0100, Benno Schulenberg wrote: > > > [...cfdisk...] > > > prompted for a partition size, would put the cursor at the start > > > of the suggested value, and hitting any other key than Enter > > > would erase this value. That is nice and desirable behaviour. > > > Could that be restored? > > > > It would be better to implement full one line editor with support for > > all basic keys and with ability to insert and erase chars on > > arbitrary position with in the string... v2.27 :-) > > Maybe link with GNU readline, to avoid reinventing the wheel. yep, and maybe for all fdisks, but it would be probably nice to have it optional (--with-readline), and without readline keep it simple and stupid. Karel -- Karel Zak <kzak@redhat.com> http://karelzak.blogspot.com ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: cfdisk's input fields behave awkwardly (in utf8 locale) 2015-02-02 12:37 ` Karel Zak @ 2015-02-02 12:46 ` Ingo Brückl 2015-02-02 12:49 ` Peter Cordes 2015-02-03 15:22 ` Ondrej Oprala 2 siblings, 0 replies; 9+ messages in thread From: Ingo Brückl @ 2015-02-02 12:46 UTC (permalink / raw) To: util-linux Karel Zak wrote on Mon, 2 Feb 2015 13:37:36 +0100: > On Mon, Feb 02, 2015 at 08:29:23AM -0400, Peter Cordes wrote: >> On Mon, Feb 02, 2015 at 01:11:26PM +0100, Karel Zak wrote: >> > On Sun, Feb 01, 2015 at 03:02:06PM +0100, Benno Schulenberg wrote: >> > > [...cfdisk...] >> > > prompted for a partition size, would put the cursor at the start >> > > of the suggested value, and hitting any other key than Enter >> > > would erase this value. That is nice and desirable behaviour. >> > > Could that be restored? >> > >> > It would be better to implement full one line editor with support for >> > all basic keys and with ability to insert and erase chars on >> > arbitrary position with in the string... v2.27 :-) >> >> Maybe link with GNU readline, to avoid reinventing the wheel. > yep, and maybe for all fdisks, but it would be probably nice to have > it optional (--with-readline), [...] Absolutely! Ingo ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: cfdisk's input fields behave awkwardly (in utf8 locale) 2015-02-02 12:37 ` Karel Zak 2015-02-02 12:46 ` Ingo Brückl @ 2015-02-02 12:49 ` Peter Cordes 2015-02-03 15:22 ` Ondrej Oprala 2 siblings, 0 replies; 9+ messages in thread From: Peter Cordes @ 2015-02-02 12:49 UTC (permalink / raw) To: Karel Zak; +Cc: Benno Schulenberg, Util-Linux On Mon, Feb 02, 2015 at 01:37:36PM +0100, Karel Zak wrote: > On Mon, Feb 02, 2015 at 08:29:23AM -0400, Peter Cordes wrote: > > > > Maybe link with GNU readline, to avoid reinventing the wheel. > > yep, and maybe for all fdisks, but it would be probably nice to have > it optional (--with-readline), and without readline keep it simple and > stupid. Yeah, I think that's the behaviour I've seen from other packages. When built without readline, they just leave the tty in cooked mode, so a line of input becomes read(2)able when the user presses return. I guess cfdisk already has an arrow-key driven UI, so the wrapper for readline (that compiles to a fallback #ifndef HAVE_READLINE) would have to put the tty in/out of cooked mode. -- #define X(x,y) x##y Peter Cordes ; e-mail: X(peter@cor , des.ca) "The gods confound the man who first found out how to distinguish the hours! Confound him, too, who in this place set up a sundial, to cut and hack my day so wretchedly into small pieces!" -- Plautus, 200 BC ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: cfdisk's input fields behave awkwardly (in utf8 locale) 2015-02-02 12:37 ` Karel Zak 2015-02-02 12:46 ` Ingo Brückl 2015-02-02 12:49 ` Peter Cordes @ 2015-02-03 15:22 ` Ondrej Oprala 2 siblings, 0 replies; 9+ messages in thread From: Ondrej Oprala @ 2015-02-03 15:22 UTC (permalink / raw) To: Karel Zak, Peter Cordes; +Cc: Benno Schulenberg, Util-Linux On 02/02/2015 01:37 PM, Karel Zak wrote: > On Mon, Feb 02, 2015 at 08:29:23AM -0400, Peter Cordes wrote: >> On Mon, Feb 02, 2015 at 01:11:26PM +0100, Karel Zak wrote: >>> On Sun, Feb 01, 2015 at 03:02:06PM +0100, Benno Schulenberg wrote: >>>> [...cfdisk...] >>>> prompted for a partition size, would put the cursor at the start >>>> of the suggested value, and hitting any other key than Enter >>>> would erase this value. That is nice and desirable behaviour. >>>> Could that be restored? >>> It would be better to implement full one line editor with support for >>> all basic keys and with ability to insert and erase chars on >>> arbitrary position with in the string... v2.27 :-) >> Maybe link with GNU readline, to avoid reinventing the wheel. > yep, and maybe for all fdisks, but it would be probably nice to have > it optional (--with-readline), and without readline keep it simple and > stupid. > > Karel > Working on it, got {s,}fdisk already readline-d Cheers, Ondrej ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: cfdisk's input fields behave awkwardly (in utf8 locale) 2015-02-02 12:11 ` Karel Zak 2015-02-02 12:29 ` Peter Cordes @ 2015-02-02 20:42 ` Benno Schulenberg 2015-02-03 10:22 ` Karel Zak 1 sibling, 1 reply; 9+ messages in thread From: Benno Schulenberg @ 2015-02-02 20:42 UTC (permalink / raw) To: Karel Zak; +Cc: Util-Linux On Mon, Feb 2, 2015, at 13:11, Karel Zak wrote: > On Sun, Feb 01, 2015 at 03:02:06PM +0100, Benno Schulenberg wrote: > > Anyway, if the cursor keys would not produce weird characters, > > and they can't be made to work normally (that is: to go left and > > right), then the only way to change the suggested value is to use > > the Backspace key. This is awkward. The older cfdisk, when it > > "Fixed" .. I just disable some keys (like left, right...). Thanks. You forgot a few "Reported-by:" tags, though. > > Also, upon startup the old cfdisk would put the cursor on the > > menu item "Quit", showing the user the most important thing > > right at the start: how to get out. This is extra useful when > > cfdisk is localized to another language where the word for quit > > doesn't start with a Q. Could this initial menu-item selection > > be restored? > > Fixed. Nice. However... when the cursor is moved to a free space, it would be nice if then automatically the New menu item gets selected. Benno -- http://www.fastmail.com - A no graphics, no pop-ups email service ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: cfdisk's input fields behave awkwardly (in utf8 locale) 2015-02-02 20:42 ` Benno Schulenberg @ 2015-02-03 10:22 ` Karel Zak 0 siblings, 0 replies; 9+ messages in thread From: Karel Zak @ 2015-02-03 10:22 UTC (permalink / raw) To: Benno Schulenberg; +Cc: Util-Linux On Mon, Feb 02, 2015 at 09:42:29PM +0100, Benno Schulenberg wrote: > You forgot a few "Reported-by:" tags, though. Sorry. > > > Also, upon startup the old cfdisk would put the cursor on the > > > menu item "Quit", showing the user the most important thing > > > right at the start: how to get out. This is extra useful when > > > cfdisk is localized to another language where the word for quit > > > doesn't start with a Q. Could this initial menu-item selection > > > be restored? > > > > Fixed. > > Nice. However... when the cursor is moved to a free space, it > would be nice if then automatically the New menu item gets > selected. Fixed, now there is "preferred key" for each menu, "New" for free space and "Quit" for the rest. Karel -- Karel Zak <kzak@redhat.com> http://karelzak.blogspot.com ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2015-02-03 15:22 UTC | newest] Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2015-02-01 14:02 cfdisk's input fields behave awkwardly (in utf8 locale) Benno Schulenberg 2015-02-02 12:11 ` Karel Zak 2015-02-02 12:29 ` Peter Cordes 2015-02-02 12:37 ` Karel Zak 2015-02-02 12:46 ` Ingo Brückl 2015-02-02 12:49 ` Peter Cordes 2015-02-03 15:22 ` Ondrej Oprala 2015-02-02 20:42 ` Benno Schulenberg 2015-02-03 10:22 ` Karel Zak
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.