What setting controls moving the cursor on the command line?Shell: how to go to the beginning of line when you are inside a screen?Moving through history of commands on command line?bash command line editing (Emacs shortcuts)What is the meaning of (^| )ABC( |$) as an extended REGEX ?how to move by a word in command line in tcsh?What are the keyboard shortcuts for the command-line?How to copy text from command line to clipboard without using the mouse?Do all different Linux distributions have the same command lines?Command-line diff toolWhat is the theoretical upper limit of commands a user can execute in one line?
Idiom for 'person who gets violent when drunk"
What publication claimed that Michael Jackson died in a nuclear holocaust?
David slept with Bathsheba because she was pure?? What does that mean?
How to soundproof the Wood Shop?
Dedicated bike GPS computer over smartphone
Placement of positioning lights on A320 winglets
Did I need a visa in 2004 and 2006?
How to properly use a function under a class?
Is fission/fusion to iron the most efficient way to convert mass to energy?
How can religions without a hell discourage evil-doing?
Am I allowed to determine tenets of my contract as a warlock?
Is it good practice to create tables dynamically?
Is Jesus the last Prophet?
Why is my Taiyaki (Cake that looks like a fish) too hard and dry?
Which game is this?
What is the language spoken in Babylon?
In American Politics, why is the Justice Department under the President?
When editor does not respond to the request for withdrawal
Can I attach a DC blower to intake manifold of my 150CC Yamaha FZS FI engine?
LWC: detect last element in for:each iteration
Do they make "karaoke" versions of concertos for solo practice?
Why did Robert pick unworthy men for the White Cloaks?
Is all-caps blackletter no longer taboo?
In Pandemic, why take the extra step of eradicating a disease after you've cured it?
What setting controls moving the cursor on the command line?
Shell: how to go to the beginning of line when you are inside a screen?Moving through history of commands on command line?bash command line editing (Emacs shortcuts)What is the meaning of (^| )ABC( |$) as an extended REGEX ?how to move by a word in command line in tcsh?What are the keyboard shortcuts for the command-line?How to copy text from command line to clipboard without using the mouse?Do all different Linux distributions have the same command lines?Command-line diff toolWhat is the theoretical upper limit of commands a user can execute in one line?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
On some Unix systems, I can type Ctrl-A or Ctrl-E to move to the beginning or end of the line. On some Unix systems I can not and it just prints ^A or ^E, etc. What controls whether this keystoke works as I expect (move around the command line), or prints the ^A, ^E, etc. character?
linux command-line
add a comment |
On some Unix systems, I can type Ctrl-A or Ctrl-E to move to the beginning or end of the line. On some Unix systems I can not and it just prints ^A or ^E, etc. What controls whether this keystoke works as I expect (move around the command line), or prints the ^A, ^E, etc. character?
linux command-line
add a comment |
On some Unix systems, I can type Ctrl-A or Ctrl-E to move to the beginning or end of the line. On some Unix systems I can not and it just prints ^A or ^E, etc. What controls whether this keystoke works as I expect (move around the command line), or prints the ^A, ^E, etc. character?
linux command-line
On some Unix systems, I can type Ctrl-A or Ctrl-E to move to the beginning or end of the line. On some Unix systems I can not and it just prints ^A or ^E, etc. What controls whether this keystoke works as I expect (move around the command line), or prints the ^A, ^E, etc. character?
linux command-line
linux command-line
edited Jun 6 at 18:03
Classified
asked Jun 5 at 20:31
ClassifiedClassified
22358
22358
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
It all depends on specific shell implementation (you might have different default shell on different systems or even for different users within a single system, e.g. bash, ksh, tcsh, etc).
Also it depends on shell itself.
E.g. bash supports two modes: emacs and vi. Each mode has its own shortcuts (emacs or vi like). To change it you have to execute set -o emacs (normally it's a default one) or set -o vi
You can find more information in your specific shell documentation.
add a comment |
tl;dr
set -o emacs
will enable the Ctrl-A, Ctrl-E, Ctrl-B, etc emacs key bindings in most shells you're likely to use.
The shell may not have any line editing capabilities, or may be in the vi editing mode (the only one specified by the standard).
When not in emacs editing mode, the Ctrl-A and Ctrl-E have no special significance. If the echo and echoctl stty/termios setting are on, all control keys which are not handled specially will be displayed in the ^A, ^X, etc, "caret" notation.
Many shells (like ksh or zsh) will determine the default editing mode (vi or emacs) based on the values of VISUAL and EDITOR environment variables (in this order of precedence, and also handling variants like vim, elvis, xemacs, etc).
This was broken (very annoyingly!) in mksh, but it's also still the case in other pdksh-derived shells.
Other shells like bash or tcsh default to the emacs editing mode, but that may also be overridden from the configuration file of the line editing library.
For the readline library used by bash and many other programs, the configuration files is ~/.inputrc (or a file specified in the INPUTRC environment variable) with a fallback to /etc/inputrc and the settings are:
set editing-mode vi
set editing-mode emacs
For the editline/libedit[1] library used by many BSD programs, the configuration file is usually ~/.editrc and the settings are:
bind -v # for vi
bind -e # for emacs
[1] not to be confused with the libeditline readline "work-alike" which only provides an emacs editing-mode.
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f523146%2fwhat-setting-controls-moving-the-cursor-on-the-command-line%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
It all depends on specific shell implementation (you might have different default shell on different systems or even for different users within a single system, e.g. bash, ksh, tcsh, etc).
Also it depends on shell itself.
E.g. bash supports two modes: emacs and vi. Each mode has its own shortcuts (emacs or vi like). To change it you have to execute set -o emacs (normally it's a default one) or set -o vi
You can find more information in your specific shell documentation.
add a comment |
It all depends on specific shell implementation (you might have different default shell on different systems or even for different users within a single system, e.g. bash, ksh, tcsh, etc).
Also it depends on shell itself.
E.g. bash supports two modes: emacs and vi. Each mode has its own shortcuts (emacs or vi like). To change it you have to execute set -o emacs (normally it's a default one) or set -o vi
You can find more information in your specific shell documentation.
add a comment |
It all depends on specific shell implementation (you might have different default shell on different systems or even for different users within a single system, e.g. bash, ksh, tcsh, etc).
Also it depends on shell itself.
E.g. bash supports two modes: emacs and vi. Each mode has its own shortcuts (emacs or vi like). To change it you have to execute set -o emacs (normally it's a default one) or set -o vi
You can find more information in your specific shell documentation.
It all depends on specific shell implementation (you might have different default shell on different systems or even for different users within a single system, e.g. bash, ksh, tcsh, etc).
Also it depends on shell itself.
E.g. bash supports two modes: emacs and vi. Each mode has its own shortcuts (emacs or vi like). To change it you have to execute set -o emacs (normally it's a default one) or set -o vi
You can find more information in your specific shell documentation.
edited Jun 5 at 21:34
answered Jun 5 at 20:58
rushrush
20.1k46697
20.1k46697
add a comment |
add a comment |
tl;dr
set -o emacs
will enable the Ctrl-A, Ctrl-E, Ctrl-B, etc emacs key bindings in most shells you're likely to use.
The shell may not have any line editing capabilities, or may be in the vi editing mode (the only one specified by the standard).
When not in emacs editing mode, the Ctrl-A and Ctrl-E have no special significance. If the echo and echoctl stty/termios setting are on, all control keys which are not handled specially will be displayed in the ^A, ^X, etc, "caret" notation.
Many shells (like ksh or zsh) will determine the default editing mode (vi or emacs) based on the values of VISUAL and EDITOR environment variables (in this order of precedence, and also handling variants like vim, elvis, xemacs, etc).
This was broken (very annoyingly!) in mksh, but it's also still the case in other pdksh-derived shells.
Other shells like bash or tcsh default to the emacs editing mode, but that may also be overridden from the configuration file of the line editing library.
For the readline library used by bash and many other programs, the configuration files is ~/.inputrc (or a file specified in the INPUTRC environment variable) with a fallback to /etc/inputrc and the settings are:
set editing-mode vi
set editing-mode emacs
For the editline/libedit[1] library used by many BSD programs, the configuration file is usually ~/.editrc and the settings are:
bind -v # for vi
bind -e # for emacs
[1] not to be confused with the libeditline readline "work-alike" which only provides an emacs editing-mode.
add a comment |
tl;dr
set -o emacs
will enable the Ctrl-A, Ctrl-E, Ctrl-B, etc emacs key bindings in most shells you're likely to use.
The shell may not have any line editing capabilities, or may be in the vi editing mode (the only one specified by the standard).
When not in emacs editing mode, the Ctrl-A and Ctrl-E have no special significance. If the echo and echoctl stty/termios setting are on, all control keys which are not handled specially will be displayed in the ^A, ^X, etc, "caret" notation.
Many shells (like ksh or zsh) will determine the default editing mode (vi or emacs) based on the values of VISUAL and EDITOR environment variables (in this order of precedence, and also handling variants like vim, elvis, xemacs, etc).
This was broken (very annoyingly!) in mksh, but it's also still the case in other pdksh-derived shells.
Other shells like bash or tcsh default to the emacs editing mode, but that may also be overridden from the configuration file of the line editing library.
For the readline library used by bash and many other programs, the configuration files is ~/.inputrc (or a file specified in the INPUTRC environment variable) with a fallback to /etc/inputrc and the settings are:
set editing-mode vi
set editing-mode emacs
For the editline/libedit[1] library used by many BSD programs, the configuration file is usually ~/.editrc and the settings are:
bind -v # for vi
bind -e # for emacs
[1] not to be confused with the libeditline readline "work-alike" which only provides an emacs editing-mode.
add a comment |
tl;dr
set -o emacs
will enable the Ctrl-A, Ctrl-E, Ctrl-B, etc emacs key bindings in most shells you're likely to use.
The shell may not have any line editing capabilities, or may be in the vi editing mode (the only one specified by the standard).
When not in emacs editing mode, the Ctrl-A and Ctrl-E have no special significance. If the echo and echoctl stty/termios setting are on, all control keys which are not handled specially will be displayed in the ^A, ^X, etc, "caret" notation.
Many shells (like ksh or zsh) will determine the default editing mode (vi or emacs) based on the values of VISUAL and EDITOR environment variables (in this order of precedence, and also handling variants like vim, elvis, xemacs, etc).
This was broken (very annoyingly!) in mksh, but it's also still the case in other pdksh-derived shells.
Other shells like bash or tcsh default to the emacs editing mode, but that may also be overridden from the configuration file of the line editing library.
For the readline library used by bash and many other programs, the configuration files is ~/.inputrc (or a file specified in the INPUTRC environment variable) with a fallback to /etc/inputrc and the settings are:
set editing-mode vi
set editing-mode emacs
For the editline/libedit[1] library used by many BSD programs, the configuration file is usually ~/.editrc and the settings are:
bind -v # for vi
bind -e # for emacs
[1] not to be confused with the libeditline readline "work-alike" which only provides an emacs editing-mode.
tl;dr
set -o emacs
will enable the Ctrl-A, Ctrl-E, Ctrl-B, etc emacs key bindings in most shells you're likely to use.
The shell may not have any line editing capabilities, or may be in the vi editing mode (the only one specified by the standard).
When not in emacs editing mode, the Ctrl-A and Ctrl-E have no special significance. If the echo and echoctl stty/termios setting are on, all control keys which are not handled specially will be displayed in the ^A, ^X, etc, "caret" notation.
Many shells (like ksh or zsh) will determine the default editing mode (vi or emacs) based on the values of VISUAL and EDITOR environment variables (in this order of precedence, and also handling variants like vim, elvis, xemacs, etc).
This was broken (very annoyingly!) in mksh, but it's also still the case in other pdksh-derived shells.
Other shells like bash or tcsh default to the emacs editing mode, but that may also be overridden from the configuration file of the line editing library.
For the readline library used by bash and many other programs, the configuration files is ~/.inputrc (or a file specified in the INPUTRC environment variable) with a fallback to /etc/inputrc and the settings are:
set editing-mode vi
set editing-mode emacs
For the editline/libedit[1] library used by many BSD programs, the configuration file is usually ~/.editrc and the settings are:
bind -v # for vi
bind -e # for emacs
[1] not to be confused with the libeditline readline "work-alike" which only provides an emacs editing-mode.
edited Jun 6 at 14:20
answered Jun 5 at 22:21
mosvymosvy
13.3k21545
13.3k21545
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f523146%2fwhat-setting-controls-moving-the-cursor-on-the-command-line%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown