diff --git a/plugins/plugin-client-common/src/components/Content/Markdown.tsx b/plugins/plugin-client-common/src/components/Content/Markdown.tsx index 7bc34ff2874..293698e959a 100644 --- a/plugins/plugin-client-common/src/components/Content/Markdown.tsx +++ b/plugins/plugin-client-common/src/components/Content/Markdown.tsx @@ -72,7 +72,12 @@ export default class Markdown extends React.PureComponent { ? undefined : async () => { let file = props.href - if (props.href.charAt(0) === '#') { + if (props.href.startsWith('#kuiexec?command=')) { + const cmdline = decodeURIComponent(props.href.slice('#kuiexec?command='.length)) + if (cmdline) { + return this.props.repl.pexec(cmdline) + } + } else if (props.href.charAt(0) === '#') { const elt = this.props.tab.querySelector( `[data-markdown-anchor="${this.anchorFrom(props.href.slice(1))}"]` ) diff --git a/plugins/plugin-kubectl/src/lib/util/help.ts b/plugins/plugin-kubectl/src/lib/util/help.ts index 1eb757585ee..66a49f3f1be 100644 --- a/plugins/plugin-kubectl/src/lib/util/help.ts +++ b/plugins/plugin-kubectl/src/lib/util/help.ts @@ -115,7 +115,7 @@ const renderHelpUnsafe = ( .map(_ => _.replace( /"([^"]+)"/g, - (_, command) => `[${command}](kui://exec?command=${encodeURIComponent(command)} "Execute ${command}")` + (_, command) => `[${command}](#kuiexec?command=${encodeURIComponent(command)} "Execute ${command}")` ) ) // .map(_ => ` - ${_}`)