mirror of https://github.com/alibaba/arthas.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
5.7 KiB
JavaScript
21 lines
5.7 KiB
JavaScript
import{_ as o,o as r,c,a as t,b as a,e,d as n,r as i}from"./app.5024572d.js";const l={},u=t("h1",{id:"keymap",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#keymap","aria-hidden":"true"},"#"),e(" keymap")],-1),s={href:"https://arthas.aliyun.com/doc/arthas-tutorials.html?language=en&id=command-keymap",target:"_blank",rel:"noopener noreferrer"},h=t("code",null,"keymap",-1),m=e(" online tutorial"),q=n(`<p>Use <code>keymap</code> command to print the current keymap:</p><p>The default keymap is:</p><table><thead><tr><th>Shortcut</th><th>Shortcut Description</th><th>Command Name</th><th>Command Description</th></tr></thead><tbody><tr><td><code>"\\C-a"</code></td><td>ctrl + a</td><td>beginning-of-line</td><td>go to the beginning of the line</td></tr><tr><td><code> "\\C-e"</code></td><td>ctrl + e</td><td>end-of-line</td><td>go to the end of the line</td></tr><tr><td><code>"\\C-f"</code></td><td>ctrl + f</td><td>forward-word</td><td>forward a word</td></tr><tr><td><code>"\\C-b"</code></td><td>ctrl + b</td><td>backward-word</td><td>backward a word</td></tr><tr><td><code>"\\e[D"</code></td><td>left arrow</td><td>backward-char</td><td>backward a character</td></tr><tr><td><code>"\\e[C"</code></td><td>right arrow</td><td>forward-char</td><td>forward a character</td></tr><tr><td><code>"\\e[B"</code></td><td>down arrow</td><td>next-history</td><td>show next history command</td></tr><tr><td><code>"\\e[A"</code></td><td>up arrow</td><td>previous-history</td><td>show previous history command</td></tr><tr><td><code>"\\C-h"</code></td><td>ctrl + h</td><td>backward-delete-char</td><td>backward delete a character</td></tr><tr><td><code>"\\C-?"</code></td><td>ctrl + shift + /</td><td>backward-delete-char</td><td>backward delete a character</td></tr><tr><td><code>"\\C-u"</code></td><td>ctrl + u</td><td>undo</td><td>clear current line</td></tr><tr><td><code>"\\C-d"</code></td><td>ctrl + d</td><td>delete-char</td><td>delete the character of the current cursor</td></tr><tr><td><code>"\\C-k"</code></td><td>ctrl + k</td><td>kill-line</td><td>delete all characters from the current cursor to the end of the line</td></tr><tr><td><code>"\\C-i"</code></td><td>ctrl + i</td><td>complete</td><td>Auto completion, equivalent to <code>TAB</code></td></tr><tr><td><code>"\\C-j"</code></td><td>ctrl + j</td><td>accept-line</td><td>end the current line, equivalent to <code>enter</code></td></tr><tr><td><code>"\\C-m"</code></td><td>ctrl + m</td><td>accept-line</td><td>end the current line, equivalent to <code>enter</code></td></tr><tr><td><code>"\\C-w"</code></td><td></td><td>backward-delete-word</td><td></td></tr><tr><td><code>"\\C-x\\e[3~"</code></td><td></td><td>backward-kill-line</td><td></td></tr><tr><td><code>"\\e\\C-?"</code></td><td></td><td>backward-kill-word</td><td></td></tr></tbody></table><ul><li>Press <code>tab</code> to enable auto-completion prompt at any time.</li><li>Enter command and <code>-</code> or <code>--</code>, then press <code>tab</code> to display the concrete options for the current command.</li></ul><h2 id="custom-shortcuts" tabindex="-1"><a class="header-anchor" href="#custom-shortcuts" aria-hidden="true">#</a> Custom shortcuts</h2><p>Specify customization in <code>$USER_HOME/.arthas/conf/inputrc</code> file in the current user home directory.</p><p>Vim user may want to map <code>ctrl+h</code> to moving the cursor forward one character. To achieve this, copy the default configuration first,</p><div class="language-text ext-text line-numbers-mode"><pre class="language-text"><code>"\\C-a": beginning-of-line
|
|
"\\C-e": end-of-line
|
|
"\\C-f": forward-word
|
|
"\\C-b": backward-word
|
|
"\\e[D": backward-char
|
|
"\\e[C": forward-char
|
|
"\\e[B": next-history
|
|
"\\e[A": previous-history
|
|
"\\C-h": backward-delete-char
|
|
"\\C-?": backward-delete-char
|
|
"\\C-u": undo
|
|
"\\C-d": delete-char
|
|
"\\C-k": kill-line
|
|
"\\C-i": complete
|
|
"\\C-j": accept-line
|
|
"\\C-m": accept-line
|
|
"\\C-w": backward-delete-word
|
|
"\\C-x\\e[3~": backward-kill-line
|
|
"\\e\\C-?": backward-kill-word
|
|
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>then replace <code>"\\C-h": backward-delete-char</code> with <code>"\\C-h": backward-char</code>, then reconnect to Arthas console to take effect.</p><h2 id="shortcuts-for-jobs" tabindex="-1"><a class="header-anchor" href="#shortcuts-for-jobs" aria-hidden="true">#</a> Shortcuts for jobs</h2><ul><li><code>ctrl + c</code>: Terminates current command</li><li><code>ctrl + z</code>: Suspends the current command, you can restore this command with <code>bg</code>/<code>fg</code>, or <code>kill</code> it.</li><li><code>ctrl + a</code>: Go to the beginning the line</li><li><code>ctrl + e</code>: Go to the end of the line</li></ul>`,11);function b(p,v){const d=i("ExternalLinkIcon");return r(),c("div",null,[u,t("p",null,[t("a",s,[h,m,a(d)])]),q])}const f=o(l,[["render",b],["__file","keymap.html.vue"]]);export{f as default};
|