Re: [PATCH] space on prompt bugfix

2005-03-21 Thread buc
Jindrich Novy wrote:
I did two patches to fix it so that you can decide which one is better
commit candidate.
Patch1:
Allows an user to type leading spaces on the command prompt, but when
enter is pressed, it tests whether the user typed at least something
except spaces. In case it finds only spaces, it deletes them from the
command prompt and let the enter be further processed.
Patch2:
Doesn't let the user to type leading spaces if he didn't write a non-
space letter already.
 

IMHO, patch1 is better way. Else end user can decide the space key is 
not working ...

--
Dmitry Butskoj [EMAIL PROTECTED]
Saint-Petersburg, Russia

___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel


Re: [PATCH] space on prompt bugfix

2005-03-21 Thread buc
Jindrich Novy wrote:
IMHO, patch1 is better way. Else end user can decide the space key is 
not working ...
   

Yes, the spacebar won't be working for leading spaces. However, typing
the leading spaces in the command prompt IMHO doesn't make too much
sense to me so maybe after patch2 is applied we may use the spacebar as
an equivalent of Ins for selecting files/dirs as usual in other
filemanagers when nothing is actually typed in the command prompt.
That is a slight advantage of the second patch so please let me know if
you like/dislike the idea so that I can do another patch for this or
simply be happy with the patch1.
 

Intuitively, the MC can be perceived as a screen extension to shell 
(which became possible due to ncurses/slang lib and Ctr/Fn/Alt/Meta 
keyboard features). Therefore, MC`s cmdline should be closer to a shell 
command line, rather than a screen application input field.
  Currently, we have only one printable character -- Tab -- which 
behaves unser MC and a shell differently (and it is reasonable). But 
don`t add space to this list!
  There are a lot of keyboard buttons, modifier keys etc. to do things 
easy -- let MC cmdline be a true command line.

--
Dmitry Butskoj [EMAIL PROTECTED]
Saint-Petersburg, Russia

___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel


Re: [PATCH] space on prompt bugfix

2005-03-21 Thread tux
 Patch2:
 Doesn't let the user to type leading spaces if he didn't write a non-
 space letter already.

Not a good idea, since I think if you prepend a space to any command, the 
command is not saved in bash history - a feature.
Sometimes it may be thus desirable to be able to type leading space if you do 
not want to save the command in history - your patch would disallow this

Martin Petricek
___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel


Re: [PATCH] space on prompt bugfix

2005-03-21 Thread Jindrich Novy
Hello Martin,

On Mon, 2005-03-21 at 17:42 +0100, [EMAIL PROTECTED] wrote:
  Patch2:
  Doesn't let the user to type leading spaces if he didn't write a non-
  space letter already.
 
 Not a good idea, since I think if you prepend a space to any command, the 
 command is not saved in bash history - a feature.
 Sometimes it may be thus desirable to be able to type leading space if you do 
 not want to save the command in history - your patch would disallow this

Ok, I forgot about this feature, thanks for noticing this.

So maybe Patch1 would be the best solution for the issue.

Jindrich

-- 
Jindrich Novy [EMAIL PROTECTED], http://people.redhat.com/jnovy/

___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel


Re: [PATCH] space on prompt bugfix

2005-03-21 Thread Leonard den Ottolander
Hi Jindrich,

On Mon, 2005-03-21 at 18:25, Jindrich Novy wrote:
 On Mon, 2005-03-21 at 17:42 +0100, [EMAIL PROTECTED] wrote:
  Not a good idea, since I think if you prepend a space to any command, the 
  command is not saved in bash history - a feature.
  Sometimes it may be thus desirable to be able to type leading space if you 
  do not want to save the command in history - your patch would disallow this
 
 Ok, I forgot about this feature, thanks for noticing this.

HISTCONTROL=ignorespace is actually used actively by mc itself to hide
mc commands from the history in subshell.c ;) .

Leonard.

-- 
mount -t life -o ro /dev/dna /genetic/research


___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel


Re[2]: [PATCH] space on prompt bugfix

2005-03-21 Thread Pavel Shirshov (pchel)
Hello buc,

Monday, March 21, 2005, 7:44:46 PM, you wrote:

b Intuitively, the MC can be perceived as a screen extension to shell
b (which became possible due to ncurses/slang lib and Ctr/Fn/Alt/Meta
b keyboard features). Therefore, MC`s cmdline should be closer to a shell
b command line, rather than a screen application input field.
bCurrently, we have only one printable character -- Tab -- which 
b behaves unser MC and a shell differently (and it is reasonable). But
b don`t add space to this list!
bThere are a lot of keyboard buttons, modifier keys etc. to do things
b easy -- let MC cmdline be a true command line.

MC cmdline isn't a true command line.

Please. Read man mc.

  Macro Substitution
   When  accessing  a  user menu, or executing an extension dependent com-
   mand, or running a command from the command line input, a simple  macro
   substitution takes place.

...

   and so on.

-- 
Best regards,
 Pavelmailto:[EMAIL PROTECTED]

___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel