Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
5 added 309 characters in body
source | link

I did a quick foray into /usr/src/bin/ksh on my OpenBSD system, seeing as I had the actual sources checked out anyway. I had a cursory glance at c_ksh.c, emacs.c and vi.c and it looks as if the Vi mode was retrofitted into pdksh from nsh at some point (around 1989/1990). The exact words used are

/*      $OpenBSD: vi.c,v 1.55 2018/01/16 22:52:32 jca Exp $     */

/*
 *      vi command editing
 *      written by John Rochester (initially for nsh)
 *      bludgeoned to fit pdksh by Larry Bouzane, Jeff Sparkes & Eric Gisin
 *
 */

The bind-able functions all live in emacs.c, as does the x_bind() function which gets called by the bind builtin, while vi.c seems to have its own implementation of some of them under different names that are not called from x_bind().

Therefore I think I can conclude that the bind builtin is a no-op in Vi-mode in this particular shell.

UPDATE (2018-02-04): After reporting this to the openbsd-misc list, it was confirmed that bind does indeed not do anything in Vi command line editing mode. A patch will go in to modify the ksh manual on OpenBSD so that this is mentioned.:

bind string=[editing-command] ...

In Emacs editing mode, the specified editing command is bound to the given string. Future input of the string will cause the editing command to be immediately invoked. Bindings have no effect in Vi editing mode.

I did a quick foray into /usr/src/bin/ksh on my OpenBSD system, seeing as I had the actual sources checked out anyway. I had a cursory glance at c_ksh.c, emacs.c and vi.c and it looks as if the Vi mode was retrofitted into pdksh from nsh at some point (around 1989/1990). The exact words used are

/*      $OpenBSD: vi.c,v 1.55 2018/01/16 22:52:32 jca Exp $     */

/*
 *      vi command editing
 *      written by John Rochester (initially for nsh)
 *      bludgeoned to fit pdksh by Larry Bouzane, Jeff Sparkes & Eric Gisin
 *
 */

The bind-able functions all live in emacs.c, as does the x_bind() function which gets called by the bind builtin, while vi.c seems to have its own implementation of some of them under different names that are not called from x_bind().

Therefore I think I can conclude that the bind builtin is a no-op in Vi-mode in this particular shell.

UPDATE (2018-02-04): After reporting this to the openbsd-misc list, it was confirmed that bind does indeed not do anything in Vi command line editing mode. A patch will go in to modify the ksh manual on OpenBSD so that this is mentioned.

I did a quick foray into /usr/src/bin/ksh on my OpenBSD system, seeing as I had the actual sources checked out anyway. I had a cursory glance at c_ksh.c, emacs.c and vi.c and it looks as if the Vi mode was retrofitted into pdksh from nsh at some point (around 1989/1990). The exact words used are

/*      $OpenBSD: vi.c,v 1.55 2018/01/16 22:52:32 jca Exp $     */

/*
 *      vi command editing
 *      written by John Rochester (initially for nsh)
 *      bludgeoned to fit pdksh by Larry Bouzane, Jeff Sparkes & Eric Gisin
 *
 */

The bind-able functions all live in emacs.c, as does the x_bind() function which gets called by the bind builtin, while vi.c seems to have its own implementation of some of them under different names that are not called from x_bind().

Therefore I think I can conclude that the bind builtin is a no-op in Vi-mode in this particular shell.

UPDATE (2018-02-04): After reporting this to the openbsd-misc list, it was confirmed that bind does indeed not do anything in Vi command line editing mode. A patch will go in to modify the ksh manual on OpenBSD so that this is mentioned:

bind string=[editing-command] ...

In Emacs editing mode, the specified editing command is bound to the given string. Future input of the string will cause the editing command to be immediately invoked. Bindings have no effect in Vi editing mode.

4 added 245 characters in body
source | link

I did a quick foray into /usr/src/bin/ksh on my OpenBSD system, seeing as I had the actual sources checked out anyway. I had a cursory glance at c_ksh.c, emacs.c and vi.c and it looks as if the Vi mode was retrofitted into pdksh from nsh at some point (around 1989/1990). The exact words used are

/*      $OpenBSD: vi.c,v 1.55 2018/01/16 22:52:32 jca Exp $     */

/*
 *      vi command editing
 *      written by John Rochester (initially for nsh)
 *      bludgeoned to fit pdksh by Larry Bouzane, Jeff Sparkes & Eric Gisin
 *
 */

The bind-able functions all live in emacs.c, as does the x_bind() function which gets called by the bind builtin, while vi.c seems to have its own implementation of some of them under different names that are not called from x_bind().

Therefore I think I can conclude that the bind builtin is a no-op in Vi-mode in this particular shell.

UPDATE (2018-02-04): After reporting this to the openbsd-misc list, it was confirmed that bind does indeed not do anything in Vi command line editing mode. A patch will go in to modify the ksh manual on OpenBSD so that this is mentioned.

I did a quick foray into /usr/src/bin/ksh on my OpenBSD system, seeing as I had the actual sources checked out anyway. I had a cursory glance at c_ksh.c, emacs.c and vi.c and it looks as if the Vi mode was retrofitted into pdksh from nsh at some point (around 1989/1990). The exact words used are

/*      $OpenBSD: vi.c,v 1.55 2018/01/16 22:52:32 jca Exp $     */

/*
 *      vi command editing
 *      written by John Rochester (initially for nsh)
 *      bludgeoned to fit pdksh by Larry Bouzane, Jeff Sparkes & Eric Gisin
 *
 */

The bind-able functions all live in emacs.c, as does the x_bind() function which gets called by the bind builtin, while vi.c seems to have its own implementation of some of them under different names that are not called from x_bind().

Therefore I think I can conclude that the bind builtin is a no-op in Vi-mode in this particular shell.

I did a quick foray into /usr/src/bin/ksh on my OpenBSD system, seeing as I had the actual sources checked out anyway. I had a cursory glance at c_ksh.c, emacs.c and vi.c and it looks as if the Vi mode was retrofitted into pdksh from nsh at some point (around 1989/1990). The exact words used are

/*      $OpenBSD: vi.c,v 1.55 2018/01/16 22:52:32 jca Exp $     */

/*
 *      vi command editing
 *      written by John Rochester (initially for nsh)
 *      bludgeoned to fit pdksh by Larry Bouzane, Jeff Sparkes & Eric Gisin
 *
 */

The bind-able functions all live in emacs.c, as does the x_bind() function which gets called by the bind builtin, while vi.c seems to have its own implementation of some of them under different names that are not called from x_bind().

Therefore I think I can conclude that the bind builtin is a no-op in Vi-mode in this particular shell.

UPDATE (2018-02-04): After reporting this to the openbsd-misc list, it was confirmed that bind does indeed not do anything in Vi command line editing mode. A patch will go in to modify the ksh manual on OpenBSD so that this is mentioned.

3 added 22 characters in body
source | link

I did a quick foray into /usr/src/bin/ksh on my OpenBSD system, seeing as I had the actual sources checked out anyway. I had a cursory glance at c_ksh.c, emacs.c and vi.c and it looks as if the Vi mode was retrofitted into OpenBSD's kshpdksh from nsh at some point (around 1989/1990). The exact words used are

/*      $OpenBSD: vi.c,v 1.55 2018/01/16 22:52:32 jca Exp $     */

/*
 *      vi command editing
 *      written by John Rochester (initially for nsh)
 *      bludgeoned to fit pdksh by Larry Bouzane, Jeff Sparkes & Eric Gisin
 *
 */

The bind-able functions all live in emacs.c, as does the x_bind() function which gets called by the bind builtin, while vi.c seems to have its own implementation of some of them under different names that are not called from x_bind().

Therefore I think I can conclude that the bind builtin is a no-op in Vi-mode in this particular shell.

I did a quick foray into /usr/src/bin/ksh on my OpenBSD system, seeing as I had the actual sources checked out anyway. I had a cursory glance at c_ksh.c, emacs.c and vi.c and it looks as if the Vi mode was retrofitted into OpenBSD's ksh at some point. The exact words used are

/*      $OpenBSD: vi.c,v 1.55 2018/01/16 22:52:32 jca Exp $     */

/*
 *      vi command editing
 *      written by John Rochester (initially for nsh)
 *      bludgeoned to fit pdksh by Larry Bouzane, Jeff Sparkes & Eric Gisin
 *
 */

The bind-able functions all live in emacs.c, as does the x_bind() function which gets called by the bind builtin, while vi.c seems to have its own implementation of some of them under different names that are not called from x_bind().

Therefore I think I can conclude that the bind builtin is a no-op in Vi-mode in this particular shell.

I did a quick foray into /usr/src/bin/ksh on my OpenBSD system, seeing as I had the actual sources checked out anyway. I had a cursory glance at c_ksh.c, emacs.c and vi.c and it looks as if the Vi mode was retrofitted into pdksh from nsh at some point (around 1989/1990). The exact words used are

/*      $OpenBSD: vi.c,v 1.55 2018/01/16 22:52:32 jca Exp $     */

/*
 *      vi command editing
 *      written by John Rochester (initially for nsh)
 *      bludgeoned to fit pdksh by Larry Bouzane, Jeff Sparkes & Eric Gisin
 *
 */

The bind-able functions all live in emacs.c, as does the x_bind() function which gets called by the bind builtin, while vi.c seems to have its own implementation of some of them under different names that are not called from x_bind().

Therefore I think I can conclude that the bind builtin is a no-op in Vi-mode in this particular shell.

2 added 58 characters in body
source | link
1
source | link