Benny Siegert | 2 Mar 10:09 2012
Picon

Can mksh do bash completion scripts?

Hi,

I am just wondering if it is possible to have custom completion
scripts in mksh, like bash and zsh have.

--Benny.

--

-- 
The first essential in chemistry is that you should perform practical
work and conduct experiments, for he who performs not practical work
nor makes experiments will never attain the least degree of mastery.
        -- Abu Musa Jabir ibn Hayyan (721-815)

Thorsten Glaser | 2 Mar 15:39 2012
Picon

Re: Can mksh do bash completion scripts?

Benny Siegert dixit:

>I am just wondering if it is possible to have custom completion
>scripts in mksh, like bash and zsh have.

No. One of the strengths of mksh is that it behaves consistently.

bye,
//mirabilos
--

-- 
  “Having a smoking section in a restaurant is like having
          a peeing section in a swimming pool.”
						-- Edward Burr

Andrew Kudryashov | 12 Mar 13:02 2012
Picon

mksh horizontal scrolling

Could you add option that disables that confusing
horizontal scrolling in line editing?

Thorsten Glaser | 12 Mar 20:03 2012
Picon

Re: mksh horizontal scrolling

Andrew Kudryashov dixit:

>Could you add option that disables that confusing
>horizontal scrolling in line editing?

I had considered it. In fact this is one of the long-standing
wishlist items.

But.

Vertical cursor movement is not portable across terminals.
Implementing it would mean adding a dependency on termcap
or terminfo, pulling in a rather large (~2M) data file and
possibly a huge dynamic library or a shitload of rewritten
(NIH) code. It also would drastically reduce portability.

So, I fear, this cannot be done, even not as shell option.

Sorry,
//mirabilos
--

-- 
  “Having a smoking section in a restaurant is like having
          a peeing section in a swimming pool.”
						-- Edward Burr

Andrew Kudryashov | 13 Mar 12:19 2012
Picon

Re: mksh horizontal scrolling

On Mon, Mar 12, 2012 at 11:03 PM, Thorsten Glaser <tg@...> wrote:
> Vertical cursor movement is not portable across terminals.
> Implementing it would mean adding a dependency on termcap
> or terminfo, pulling in a rather large (~2M) data file and
> possibly a huge dynamic library or a shitload of rewritten
> (NIH) code. It also would drastically reduce portability.

What do you think about doing it original ksh way: implementing it as
disabled by default option and hardcoding ansi sequence (as most
modern terminals are compatible with it)?

Dan Holmes | 13 Mar 15:23 2012

Business Proposal for MirBSD.org

Hi MirBSD.org Team,

My name is Dan and I work with a well-trusted review site of web hosting
providers.

We are currently looking for relevant and quality sites where we can offer
sponsorship, and we think MirBSD.org fits those description.

If this is something that interests you, please get back to me anytime so I
can give you the details.

Looking for to hearing from you soon.

Sincerely,

Dan Holmes

Thorsten Glaser | 13 Mar 20:54 2012
Picon

Re: mksh horizontal scrolling

Andrew Kudryashov dixit:

>What do you think about doing it original ksh way: implementing it as
>disabled by default option and hardcoding ansi sequence (as most
>modern terminals are compatible with it)?

They aren’t. Not even for horizontal movement – we had to remove
the ANSI code for "clear from cursor to end of line" because the
modern KDE Konsole application did and still does not support it
so we have to resort to drawing a lot of spaces followed by that
same lot of backspaces instead. With vertical movement it's even
worse.

Sorry,
//mirabilos
--

-- 
  “Having a smoking section in a restaurant is like having
          a peeing section in a swimming pool.”
						-- Edward Burr

Andrew Kudryashov | 14 Mar 11:32 2012
Picon

mksh patch

This patch fixes rare cases in completion when
mksh doesn't append longest common prefix due
to miscalculation of what already was typed.
Attachment (edit.patch): application/octet-stream, 1130 bytes
Thorsten Glaser | 14 Mar 14:01 2012
Picon

Re: mksh patch

Andrew Kudryashov dixit:

>This patch fixes rare cases in completion when
>mksh doesn't append longest common prefix due
>to miscalculation of what already was typed.

Interesting. Thanks for the patch! Do you have a testcase?
I think I could make one from reading the patch, but…

bye,
//mirabilos
--

-- 
  “Having a smoking section in a restaurant is like having
          a peeing section in a swimming pool.”
						-- Edward Burr

Andrew Kudryashov | 15 Mar 11:39 2012
Picon

Re: mksh patch

Thorsten Glaser <tg@...> wrote:
> Interesting. Thanks for the patch! Do you have a testcase?
> I think I could make one from reading the patch, but…

Here is real life example that made me fire up gdb:

$ mplayer Bright\ Girl\ Success\ Story/Bright\ Girl\ Success\ Story\ Ep01/<TAB>
Ep 01.avi Ep 01.srt
$ mplayer Bright\ Girl\ Success\ Story/Bright\ Girl\ Success\ Story\ Ep01/<TAB>
Ep 01.avi Ep 01.srt
$ mplayer Bright\ Girl\ Success\ Story/Bright\ Girl\ Success\ Story\ Ep01/

It doesn't append "Ep\ 01." as it should. In general this situation
will happen if
backslashes outnumber longest common prefix, and that happens quite
often with files from Internet.

Also, I found that x_escape() does funny things to sequences of backslashes:
if file has sequence of backslashes in its name, after completion there
will be only half of backslashes and "\*" will be appended.

$ ls foo\\\\/<TAB>
will be replaced with
$ ls foo\\/\*


Gmane