Skip to content

Feature request: support ksh under OpenBSD #43

@leonstafford

Description

@leonstafford

Feature Request

Add support for default shell on OpenBSD (ksh).

Describe your use case and the problem you are facing

Trying to use wp shell cmd under OpenBSD results in errors and exits prematurely.

$ wp shell
/bin/ksh: fc: history functions not available
/bin/ksh: read: -e: unknown option
$ echo $?
0

$ wp cli info
OS:     OpenBSD 6.6 GENERIC.MP#584 amd64
Shell:  /bin/ksh
PHP binary:     /usr/local/bin/php-7.3
PHP version:    7.3.13
php.ini used:   /etc/php-7.3.ini
WP-CLI root dir:        phar://wp-cli.phar/vendor/wp-cli/wp-cli
WP-CLI vendor dir:      phar://wp-cli.phar/vendor
WP_CLI phar path:       /var/www/htdocs
WP-CLI packages dir:
WP-CLI global config:
WP-CLI project config:
WP-CLI version: 2.4.0
$ env | grep WP_CLI_CUSTOM_SHELL
WP_CLI_CUSTOM_SHELL=/bin/ksh

Describe the solution you'd like

Quick win:

Add some more detection at shell instantiation to detect shell and platform to enable running in ksh on OpenBSD.

Nice to have:

Test in a few different shell/OS environments and modify to run across more - else, fail gracefully when unsupported.

Happy to work on this

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions