Skip to content

Support hyperlinks in help command #6331

@swissspidy

Description

@swissspidy

When using wp help and the command description contains Markdown links, they are extracted and added as footnotes. Example:

DESCRIPTION

  Exports the database to a file or to STDOUT.

  This command runs on the 'after_wp_config_load' hook, after wp-config.php has been loaded into scope.

  Runs `mysqldump` utility using `DB_HOST`, `DB_NAME`, `DB_USER` and
  `DB_PASSWORD` database credentials specified in wp-config.php. Accepts any valid [`mysqldump` flags][1].

  ---
  [1] https://dev.mysql.com/doc/en/mysqldump.html#mysqldump-option-summary

These days, however, many terminal emulators are starting to support hyperlinks. We could add detection for that, similar to https://github.com/chalk/supports-hyperlinks, to improve user experience. This could be controlled via the FORCE_HYPERLINK environment variable, which is the de facto standard mechanism for that.

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions