Skip to content

Commit

Permalink
busybox: improvements to less and ash applets
Browse files Browse the repository at this point in the history
less: set MAXLINES to the default value
ash:
 - add to xbps-alternatives
 - register the shell in /etc/shells
 - enable autocompletion with $HOME and ~
  • Loading branch information
CameronNemo authored and maxice8 committed Apr 27, 2019
1 parent 7090229 commit 7b3aa5e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
4 changes: 2 additions & 2 deletions srcpkgs/busybox/files/dotconfig
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ CONFIG_FEATURE_EDITING_HISTORY=15
# CONFIG_FEATURE_EDITING_SAVE_ON_EXIT is not set
CONFIG_FEATURE_REVERSE_SEARCH=y
CONFIG_FEATURE_TAB_COMPLETION=y
# CONFIG_FEATURE_USERNAME_COMPLETION is not set
CONFIG_FEATURE_USERNAME_COMPLETION=y
# CONFIG_FEATURE_EDITING_FANCY_PROMPT is not set
CONFIG_FEATURE_EDITING_WINCH=y
# CONFIG_FEATURE_EDITING_ASK_TERMINAL is not set
Expand Down Expand Up @@ -783,7 +783,7 @@ CONFIG_I2CDUMP=y
CONFIG_I2CDETECT=y
# CONFIG_INOTIFYD is not set
CONFIG_LESS=y
CONFIG_FEATURE_LESS_MAXLINES=0
CONFIG_FEATURE_LESS_MAXLINES=9999999
CONFIG_FEATURE_LESS_BRACKETS=y
CONFIG_FEATURE_LESS_FLAGS=y
CONFIG_FEATURE_LESS_TRUNCATE=y
Expand Down
17 changes: 12 additions & 5 deletions srcpkgs/busybox/template
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Template file for 'busybox'
pkgname=busybox
version=1.30.1
revision=1
revision=2
hostmakedepends="perl"
checkdepends="zip"
short_desc="Swiss Army Knife of Embedded Linux"
Expand All @@ -11,18 +11,22 @@ homepage="http://www.busybox.net"
distfiles="${homepage}/downloads/busybox-${version}.tar.bz2"
checksum=3d1d04a4dbd34048f4794815a5c48ebb9eb53c5277e09ffffc060323b95dfbdc

_alternatives_common="
_alternatives_core="
ash:ash:/usr/bin/busybox
awk:awk:/usr/bin/busybox
hostname:hostname:/usr/bin/busybox
sh:sh:/usr/bin/busybox
vi:vi:/usr/bin/busybox
logger:logger:/usr/bin/busybox"

alternatives="
${_alternatives_common}
_alternatives="
${_alternatives_core}
ntpd:ntpd:/usr/bin/busybox
ntpd:ntpd:/etc/sv/busybox-ntpd"

alternatives="${_alternatives}"
register_shell="/usr/bin/ash"

_patch_config() {
local t="$1"
shift
Expand Down Expand Up @@ -99,7 +103,8 @@ do_install() {
busybox-core_package() {
short_desc+=" (essential applets)"
conflicts="busybox>=0 busybox-huge>=0"
alternatives="${_alternatives_common}"
alternatives="${_alternatives_core}"
register_shell="/usr/bin/ash"
pkg_install() {
vbin busybox-core/busybox_unstripped busybox
vman busybox-core/docs/busybox.1
Expand All @@ -116,6 +121,8 @@ busybox-static_package() {
busybox-huge_package() {
short_desc+=" (extra applets)"
conflicts="busybox>=0 busybox-core>=0"
alternatives="${_alternatives}"
register_shell="/usr/bin/ash"
pkg_install() {
vbin busybox-huge/busybox_unstripped busybox
vman busybox-huge/docs/busybox.1
Expand Down

0 comments on commit 7b3aa5e

Please sign in to comment.