What is 'v' key in bash vi-mode?
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
While experimenting with bash vi mode (set -o vi
) I accidentally pressed v
while in normal/command mode then my editor(vim) fire up with a file named bash-fc.XXXXXX
. what is this file? and why it opened upon pressing v
key?
bash
add a comment |Â
up vote
1
down vote
favorite
While experimenting with bash vi mode (set -o vi
) I accidentally pressed v
while in normal/command mode then my editor(vim) fire up with a file named bash-fc.XXXXXX
. what is this file? and why it opened upon pressing v
key?
bash
1
this open a visual editor that allow you to edit current command.
â Archemar
1 hour ago
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
While experimenting with bash vi mode (set -o vi
) I accidentally pressed v
while in normal/command mode then my editor(vim) fire up with a file named bash-fc.XXXXXX
. what is this file? and why it opened upon pressing v
key?
bash
While experimenting with bash vi mode (set -o vi
) I accidentally pressed v
while in normal/command mode then my editor(vim) fire up with a file named bash-fc.XXXXXX
. what is this file? and why it opened upon pressing v
key?
bash
bash
asked 1 hour ago
cevhyruz
11019
11019
1
this open a visual editor that allow you to edit current command.
â Archemar
1 hour ago
add a comment |Â
1
this open a visual editor that allow you to edit current command.
â Archemar
1 hour ago
1
1
this open a visual editor that allow you to edit current command.
â Archemar
1 hour ago
this open a visual editor that allow you to edit current command.
â Archemar
1 hour ago
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
3
down vote
It is the same as Ctrl+X Ctrl+E in Emacs command line editing mode. It brings up the editor specified by $VISUAL
or $EDITOR
(or emacs
if the environment variables VISUAL
and EDITOR
are unset) for you to edit the current command in a temporary file. Save the file and exit the editor to execute the command.
From the bash
manual (which does not document the Vi commands):
edit-and-execute-command
(C-xC-e
)
Invoke an editor on the current command line, and execute the
result as shell commands. Bash attempts to invoke$VISUAL
,
$EDITOR
, andemacs
as the editor, in that order.
Thanks for the info! so thev
key was just the vi-mode keybinding for thefc
builtin? I'm just wondering since I already had vim to display a custom statusline forfc
(FCEDIT= "$EDITOR -u ~/fcedit.vim"
) why it wont work for that?
â cevhyruz
58 mins ago
@cevhyruz I'm not 100% certain, but there's no indication thatfc
is being invoked or thatFCEDIT
is being used when triggering this Readline library function.
â Kusalananda
22 mins ago
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
It is the same as Ctrl+X Ctrl+E in Emacs command line editing mode. It brings up the editor specified by $VISUAL
or $EDITOR
(or emacs
if the environment variables VISUAL
and EDITOR
are unset) for you to edit the current command in a temporary file. Save the file and exit the editor to execute the command.
From the bash
manual (which does not document the Vi commands):
edit-and-execute-command
(C-xC-e
)
Invoke an editor on the current command line, and execute the
result as shell commands. Bash attempts to invoke$VISUAL
,
$EDITOR
, andemacs
as the editor, in that order.
Thanks for the info! so thev
key was just the vi-mode keybinding for thefc
builtin? I'm just wondering since I already had vim to display a custom statusline forfc
(FCEDIT= "$EDITOR -u ~/fcedit.vim"
) why it wont work for that?
â cevhyruz
58 mins ago
@cevhyruz I'm not 100% certain, but there's no indication thatfc
is being invoked or thatFCEDIT
is being used when triggering this Readline library function.
â Kusalananda
22 mins ago
add a comment |Â
up vote
3
down vote
It is the same as Ctrl+X Ctrl+E in Emacs command line editing mode. It brings up the editor specified by $VISUAL
or $EDITOR
(or emacs
if the environment variables VISUAL
and EDITOR
are unset) for you to edit the current command in a temporary file. Save the file and exit the editor to execute the command.
From the bash
manual (which does not document the Vi commands):
edit-and-execute-command
(C-xC-e
)
Invoke an editor on the current command line, and execute the
result as shell commands. Bash attempts to invoke$VISUAL
,
$EDITOR
, andemacs
as the editor, in that order.
Thanks for the info! so thev
key was just the vi-mode keybinding for thefc
builtin? I'm just wondering since I already had vim to display a custom statusline forfc
(FCEDIT= "$EDITOR -u ~/fcedit.vim"
) why it wont work for that?
â cevhyruz
58 mins ago
@cevhyruz I'm not 100% certain, but there's no indication thatfc
is being invoked or thatFCEDIT
is being used when triggering this Readline library function.
â Kusalananda
22 mins ago
add a comment |Â
up vote
3
down vote
up vote
3
down vote
It is the same as Ctrl+X Ctrl+E in Emacs command line editing mode. It brings up the editor specified by $VISUAL
or $EDITOR
(or emacs
if the environment variables VISUAL
and EDITOR
are unset) for you to edit the current command in a temporary file. Save the file and exit the editor to execute the command.
From the bash
manual (which does not document the Vi commands):
edit-and-execute-command
(C-xC-e
)
Invoke an editor on the current command line, and execute the
result as shell commands. Bash attempts to invoke$VISUAL
,
$EDITOR
, andemacs
as the editor, in that order.
It is the same as Ctrl+X Ctrl+E in Emacs command line editing mode. It brings up the editor specified by $VISUAL
or $EDITOR
(or emacs
if the environment variables VISUAL
and EDITOR
are unset) for you to edit the current command in a temporary file. Save the file and exit the editor to execute the command.
From the bash
manual (which does not document the Vi commands):
edit-and-execute-command
(C-xC-e
)
Invoke an editor on the current command line, and execute the
result as shell commands. Bash attempts to invoke$VISUAL
,
$EDITOR
, andemacs
as the editor, in that order.
edited 1 hour ago
answered 1 hour ago
Kusalananda
112k15216343
112k15216343
Thanks for the info! so thev
key was just the vi-mode keybinding for thefc
builtin? I'm just wondering since I already had vim to display a custom statusline forfc
(FCEDIT= "$EDITOR -u ~/fcedit.vim"
) why it wont work for that?
â cevhyruz
58 mins ago
@cevhyruz I'm not 100% certain, but there's no indication thatfc
is being invoked or thatFCEDIT
is being used when triggering this Readline library function.
â Kusalananda
22 mins ago
add a comment |Â
Thanks for the info! so thev
key was just the vi-mode keybinding for thefc
builtin? I'm just wondering since I already had vim to display a custom statusline forfc
(FCEDIT= "$EDITOR -u ~/fcedit.vim"
) why it wont work for that?
â cevhyruz
58 mins ago
@cevhyruz I'm not 100% certain, but there's no indication thatfc
is being invoked or thatFCEDIT
is being used when triggering this Readline library function.
â Kusalananda
22 mins ago
Thanks for the info! so the
v
key was just the vi-mode keybinding for the fc
builtin? I'm just wondering since I already had vim to display a custom statusline for fc
(FCEDIT= "$EDITOR -u ~/fcedit.vim"
) why it wont work for that?â cevhyruz
58 mins ago
Thanks for the info! so the
v
key was just the vi-mode keybinding for the fc
builtin? I'm just wondering since I already had vim to display a custom statusline for fc
(FCEDIT= "$EDITOR -u ~/fcedit.vim"
) why it wont work for that?â cevhyruz
58 mins ago
@cevhyruz I'm not 100% certain, but there's no indication that
fc
is being invoked or that FCEDIT
is being used when triggering this Readline library function.â Kusalananda
22 mins ago
@cevhyruz I'm not 100% certain, but there's no indication that
fc
is being invoked or that FCEDIT
is being used when triggering this Readline library function.â Kusalananda
22 mins ago
add a comment |Â
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
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f478275%2fwhat-is-v-key-in-bash-vi-mode%23new-answer', 'question_page');
);
Post as a guest
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
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
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
1
this open a visual editor that allow you to edit current command.
â Archemar
1 hour ago