WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: vi editing mode in busybox?  (Read 9530 times)

Offline pgf

  • Newbie
  • *
  • Posts: 4
vi editing mode in busybox?
« on: February 02, 2010, 02:24:55 PM »
any chance someone could enable vi editing mode in busybox?  it's a very frustrating thing to have missing, if you're used to using vi-mode in other shells.

(tinycore is great, btw -- thank you for "distro-izing" busybox.)

paul

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: vi editing mode in busybox?
« Reply #1 on: February 02, 2010, 03:30:47 PM »
What do you mean?
The TC busybox includes vi.

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Re: vi editing mode in busybox?
« Reply #2 on: February 02, 2010, 06:28:31 PM »
I guess it's the shell command line and history editing mode that the OP is referring to. You usually get it with "set -o vi" (e.g. in bash or ksh).

Our busybox sh accepts this command and seem to change an internal flag (as can be seen from "set -o" output), unfortunately the editing mode does not change at all.

As I've seen the same with the busybox sh of Slitaz I'd tend to see this as a bug of busybox. OTOH it could well be a busybox compile time setting that would need to be changed by Robert. In which case I'm with the OP in asking to enable that feature in the future (since I'm also very much used to this VI mode).
« Last Edit: February 02, 2010, 06:38:21 PM by maro »

Offline ^thehatsrule^

  • Administrator
  • Hero Member
  • *****
  • Posts: 1726
Re: vi editing mode in busybox?
« Reply #3 on: February 02, 2010, 06:53:39 PM »
Yes, I think OP is referring to those prompt editing modes.

See CONFIG_FEATURE_EDITING_VI in busybox to try it out.

Offline pgf

  • Newbie
  • *
  • Posts: 4
Re: vi editing mode in busybox?
« Reply #4 on: February 03, 2010, 08:17:51 AM »
yes, thanks -- i'm referring to CONFIG_FEATURE_EDITING_VI, which should be enabled in the busybox build.

btw, "set -o vi" is accepted and ignored, even when this feature is disabled, so that user profile scripts which set it don't break.  i suppose it's arguable that maybe the script _should_ break, but since the option only affects interactive use, i think it's better the way it is.

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Re: vi editing mode in busybox?
« Reply #5 on: April 01, 2010, 06:07:11 PM »
@Robert: I was wondering at what point you are planning to re-build busybox.

IIRC for TC 2.9rc2 and 2.9rc3 you had included a new version (v1.15.3) which you then dropped from 2.9rc4 onwards (back to v1.14.3). Today I could have really done better with this VI editing mode and thought "Hey didn't we have that at some stage?" Turns out we had this for those two release candidates only. Any chance of a rebuild with v1.14.3 or are planning another attempt with the latest stable version (i.e. v1.16.1)?

Offline roberts

  • Administrator
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: vi editing mode in busybox?
« Reply #6 on: April 01, 2010, 09:09:32 PM »
We were experiencing segfaults with 1.15.3.
I have been so focused on writing infrastructure code that I do need reminding to try again with a later busybox. Will add to my current TODO list.
10+ Years Contributing to Linux Open Source Projects.

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Re: vi editing mode in busybox?
« Reply #7 on: April 01, 2010, 09:37:55 PM »
Robert: Please don't misunderstand me, there is no need to rush things or divert your attention for such a minor "feature".

OTOH according to the busybox web page they claim to have addressed several SEGV since v1.15.3 (plus a few potentially useful new applets like lspci, lsusb).

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10957
Re: vi editing mode in busybox?
« Reply #8 on: April 02, 2010, 09:07:01 AM »
The fix for our problem should be in 1.16.1
The only barriers that can stop you are the ones you create yourself.