terminfo and Bourne shell editing - BSD

This is a discussion on terminfo and Bourne shell editing - BSD ; So how on OpenBSD is one expected to import terminfo files from other systems? terminfo(5) says that OpenBSD doesn't use separate files in /usr/share/terminfo/* directories, but uses a central terminfo.db file instead. However, I copied my terminfo files (from my ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: terminfo and Bourne shell editing

  1. terminfo and Bourne shell editing

    So how on OpenBSD is one expected to import terminfo files from other
    systems? terminfo(5) says that OpenBSD doesn't use separate files in
    /usr/share/terminfo/* directories, but uses a central terminfo.db file
    instead. However, I copied my terminfo files (from my Debian Linux
    system -- particularly because when I ssh into the VAX it keeps the TERM
    as xterm-debian) into /usr/share/terminfo/x (having created that first)
    and it seems to work. Is the terminfo.db thing just a convention but it
    still accepts the other directories?

    How can I get the Bourne shell (/bin/sh) to accept keys which generate 4
    characters in bind? My terminal settings use the usual xterm ones for
    Home, End, Delete etc., which are ^[[1~, ^[[4~, ^[[3~ etc. (^[ being the
    Escape), but doing

    bind '^[[1~'=beginning-of-line
    bind '^[[4~'=end-of-line
    bind '^[[3~'=delete-char-forward

    pressing the keys does the operation but then the ~ gets entered as a
    normal character which spoils the effect.

    man sh tells me for the bind command "see Emacs interactive input line
    editing below for a complete description" -- but there is no such
    section in the man page...

    Chris C

  2. Re: terminfo and Bourne shell editing

    On Thu, 11 Aug 2005 08:25:33 -0500, John McGrail
    wrote:

    > On 2005-08-11, Chris Croughton wrote:
    >>
    >> man sh tells me for the bind command "see Emacs interactive input line
    >> editing below for a complete description" -- but there is no such
    >> section in the man page...

    >
    > OpenBSD's sh is really ksh with some non-bourne shell compatible features
    > disabled (I forget if the is compile time or runtime disabling, but I
    > leave that as an exercise for someone else).


    Ah, thanks! It identifies itself as "public domain Bourne shell".

    > If you
    > man ksh
    > you'll be able to find the emacs editing mode section.
    >
    > How applicable that section is to sh, I don't know.


    It seems to be -- and seems to imply that it just can't cope with
    character sequences longer than 3 characters.

    Oh well, I've just built bash -- it only took about 3 hours. But typing
    "make install" seems to be deciding to rebuild everything again, so I
    broke into that, copied the executable manually and did make install in
    the doc subdirectory to install that...

    Chris C

  3. Re: terminfo and Bourne shell editing

    On 2005-08-11, Chris Croughton wrote:
    >
    > Ah, thanks! It identifies itself as "public domain Bourne shell".
    >


    You'll find references to pdksh sprinkled all throughout the man
    page. I'd always thought the two man pages were largely the same,
    until you pointed out the missing command line section.

    If you go way down near the end of the sh man page you'll find the
    NOTES section which includes a little more info about sh's roots.

    >
    > It seems to be -- and seems to imply that it just can't cope with
    > character sequences longer than 3 characters.
    >


    An alternate solution to your problem is to remap the keys within
    xterm (I can't remember what your original problem is and am too lazy
    to look up older posts). I've used this in past lives to map the Home
    and End keys to ^a and ^e. This can cause problems for other programs
    though.

    > Oh well, I've just built bash -- it only took about 3 hours. But typing
    > "make install" seems to be deciding to rebuild everything again, so I
    > broke into that, copied the executable manually and did make install in
    > the doc subdirectory to install that...


    You can save yourself the compiling time by downloading the bash-static
    package from ftp.openbsd.org (or a suitable mirror) and using pkg_add
    to install it.

    --
    ratfood@food.skaterat.net
    All foods should be removed to reply

+ Reply to Thread