What is 'v' key in bash vi-mode?

The name of the pictureThe name of the pictureThe name of the pictureClash 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?










share|improve this question

















  • 1




    this open a visual editor that allow you to edit current command.
    – Archemar
    1 hour ago














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?










share|improve this question

















  • 1




    this open a visual editor that allow you to edit current command.
    – Archemar
    1 hour ago












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?










share|improve this question













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






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 1 hour ago









cevhyruz

11019




11019







  • 1




    this open a visual editor that allow you to edit current command.
    – Archemar
    1 hour ago












  • 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










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, and emacs as the editor, in that order.







share|improve this answer






















  • 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











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',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















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






























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, and emacs as the editor, in that order.







share|improve this answer






















  • 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















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, and emacs as the editor, in that order.







share|improve this answer






















  • 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













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, and emacs as the editor, in that order.







share|improve this answer














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, and emacs as the editor, in that order.








share|improve this answer














share|improve this answer



share|improve this answer








edited 1 hour ago

























answered 1 hour ago









Kusalananda

112k15216343




112k15216343











  • 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

















  • 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
















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


















 

draft saved


draft discarded















































 


draft saved


draft discarded














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













































































Comments

Popular posts from this blog

What does second last employer means? [closed]

Installing NextGIS Connect into QGIS 3?

One-line joke