[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#954075: busybox: provide a low-priority alternative for vi, view, editor



Package: busybox
Version: 1:1.30.1-4
Severity: wishlist

Steps to reproduce:

- Install a chroot/container
- Install busybox

Expected results:

- If a more fully-featured vi is installed (vim, vim-*, nvi, etc.) then it
  provides the vi and view commands in PATH
- Otherwise, "vi foo.txt" runs busybox vi
- Ideally, "view foo.txt" would be equivalent to "busybox vi -R foo.txt"
  (but this might require a two-line shell script wrapper or busybox code
  changes to recognise view as a command, rather than just a symlink)

- If a more fully-featured editor is installed (one of the above, or a non-vi
  editor like nano, emacs etc.) then it provides the editor command in PATH
- Otherwise, "editor foo.txt" runs busybox vi

Actual result:

- If a more fully-featured editor is installed, we get the expected result
- Otherwise, vi, view and editor are unimplemented, even though busybox could
  implement them

For editor, busybox vi should probably be a higher priority than ed, but
a lower priority than any non-minimal editor.

For vi, busybox vi should probably be a lower priority than any
separately-installed vi implementation, on the basis that if you installed
nvi or elvis-tiny or something, it's probably because you wanted to use it.

See also <https://lists.debian.org/debian-devel/2020/03/msg00221.html>
(in which I thought busybox also implemented ex, but it appears I was wrong
about that).

    smcv


Reply to: