--- Philip Ganchev <[EMAIL PROTECTED]> skrev:

> On 10/1/06, Axel Liljencrantz
> <[EMAIL PROTECTED]> wrote:
> > I've finally gotten around to taking a first stab
> at
> > multiline editing. There is a patch in the darcs
> tree
> > that enables this.
> 
> Awesome!  This is very exciting!
> 
> > Features:
> >
> > * Single-line editing works as before. There
> should be
> > no missing features.
> > * When the return key follows directly after a
> > backslash, or when the commands on the commandline
> are
> > not finished (i.e. missing end command(s)), a new
> line
> > a new line is created without executing the old
> one.
> 
> How about (in addition) breaking the line
> automatically simply when it
> gets too long?  With indentation (if it is ever
> implemented), when the
> end of the line is reached, the commands would be
> indented.  This
> allows the user to concentrate on the content of the
> command, rather
> than formatting the lines.

The multiline code already does break lines that don't
fit. I suggest you try it out and see if it works the
way you meant it.

> 
> [...]
> 
> > Issues:
> >
> [...]
> > * The current history file format can't support
> > multiline commands stored as a single entry. Don't
> > know what the proper way to handle this is.
> Changing
> > the format means changing the filenmae, or we'll
> get
> > into version clashes with older fishes. Or maybe
> the
> > history should work on a line-by-line level?
> 
> Another approach is to separate the commands by two
> newlines (and
> disallow two consecutive newlines within each
> command).  This would
> make the history file more readable and avoid
> reformatting operations
> when browsing history.  I do not think the history
> should be browsed
> line-by-line.

That might work, though I do not like that kind of
arbitrary restrictions. I feel one has to be _really_
careful with a new format, since it must still be grep
friendly and simply, IMO.

> 
> > * Fish should do block indentation.
> 
> That would be great!  And presumably, it would be
> implemented as a
> separate command, through which saved scripts can be
> run to be
> auto-indented.

The fish parser is buried very deeply in the shell.
One could implement an external command that used the
same code as the parser, though. Makes sense to
provide a pretty-printer. To the todo-list!

> 
> [...]
> 

-- 
Axel


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to