edit-and-execute-command interrupted by SIGTSTPhow to execute more than one command gnome-terminalExecute...
Why weren't Gemini capsules given names?
What is the maximum amount of diamond in one Minecraft game?
How to deal with a Murder Hobo Paladin?
Bypass with wrong cvv of debit card and getting OTP
How serious is plagiarism in a master’s thesis?
Did Stalin kill all Soviet officers involved in the Winter War?
Isn't "Dave's protocol" good if only the database, and not the code, is leaked?
What is it called when the tritone is added to a minor scale?
What is this arch-and-tower near a road?
How did the IEC decide to create kibibytes?
Taking advantage when the HR forgets to communicate the rules
Is conquering your neighbors to fight a greater enemy a valid strategy?
Will electrically joined dipoles of different lengths, at right angles, behave as a multiband antenna?
Dualizable object in the category of locally presentable categories
Why do most airliners have underwing engines, while business jets have rear-mounted engines?
How did Einstein know the speed of light was constant?
Should I increase my 401(k) contributions, or increase my mortgage payments
Why do Klingons use cloaking devices?
Do I need to be legally qualified to install a Hive smart thermostat?
Has there ever been a cold war other than between the U.S. and the U.S.S.R.?
Red and White Squares
What's the difference between a type and a kind?
Initializing variables variable in an "if" statement
Electrokinesis, direct, and based on technology
edit-and-execute-command interrupted by SIGTSTP
how to execute more than one command gnome-terminalExecute bash snippets directly in shell?“-bash: 1: command not found” when evaluating >2&1Automatically open text files in editor instead of attempting to run them?Exit status of fc -e is the wrong way aroundControl characters in a terminal with an active foreground processIssue with booleans tests && and || in bashzsh line editor: Can I navigate and edit by argument?Could you explain the following statements on how nonbuiltin commands started by Bash handles signals?Why can't I find anything on this command on the net? `statftime`
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
I've been using bash's edit-and-execute-command function:
edit-and-execute-command (C-x C-e)
Invoke an editor on the current command line, and execute the result as shell commands. Bash attempts to invoke
$VISUAL,$EDITOR, andemacsas the editor, in that order.
https://www.gnu.org/software/bash/manual/html_node/Miscellaneous-Commands.html
I've noticed that if I invoke an editor,
use Ctrl-Z to put it into the background,
and then use fg to put it back into the foreground,
the shell no longer executes the temporary file.
This is handy if I want to abort the command,
but I found the behavior a little surprising the first time it happened.
My questions:
Why does this happen?
I know from the source code
thatedit_and_execute_commandeventually callsfc,
but it's not immediately clear to me
why sending SIGTSTP prevents bash from executing the temporary file.
If I had accidentally hit Ctrl-Z
and still wanted to execute the script in the temporary file still open by the editor,
what would be the best way of doing that?
bash signals line-editor fc
add a comment |
I've been using bash's edit-and-execute-command function:
edit-and-execute-command (C-x C-e)
Invoke an editor on the current command line, and execute the result as shell commands. Bash attempts to invoke
$VISUAL,$EDITOR, andemacsas the editor, in that order.
https://www.gnu.org/software/bash/manual/html_node/Miscellaneous-Commands.html
I've noticed that if I invoke an editor,
use Ctrl-Z to put it into the background,
and then use fg to put it back into the foreground,
the shell no longer executes the temporary file.
This is handy if I want to abort the command,
but I found the behavior a little surprising the first time it happened.
My questions:
Why does this happen?
I know from the source code
thatedit_and_execute_commandeventually callsfc,
but it's not immediately clear to me
why sending SIGTSTP prevents bash from executing the temporary file.
If I had accidentally hit Ctrl-Z
and still wanted to execute the script in the temporary file still open by the editor,
what would be the best way of doing that?
bash signals line-editor fc
add a comment |
I've been using bash's edit-and-execute-command function:
edit-and-execute-command (C-x C-e)
Invoke an editor on the current command line, and execute the result as shell commands. Bash attempts to invoke
$VISUAL,$EDITOR, andemacsas the editor, in that order.
https://www.gnu.org/software/bash/manual/html_node/Miscellaneous-Commands.html
I've noticed that if I invoke an editor,
use Ctrl-Z to put it into the background,
and then use fg to put it back into the foreground,
the shell no longer executes the temporary file.
This is handy if I want to abort the command,
but I found the behavior a little surprising the first time it happened.
My questions:
Why does this happen?
I know from the source code
thatedit_and_execute_commandeventually callsfc,
but it's not immediately clear to me
why sending SIGTSTP prevents bash from executing the temporary file.
If I had accidentally hit Ctrl-Z
and still wanted to execute the script in the temporary file still open by the editor,
what would be the best way of doing that?
bash signals line-editor fc
I've been using bash's edit-and-execute-command function:
edit-and-execute-command (C-x C-e)
Invoke an editor on the current command line, and execute the result as shell commands. Bash attempts to invoke
$VISUAL,$EDITOR, andemacsas the editor, in that order.
https://www.gnu.org/software/bash/manual/html_node/Miscellaneous-Commands.html
I've noticed that if I invoke an editor,
use Ctrl-Z to put it into the background,
and then use fg to put it back into the foreground,
the shell no longer executes the temporary file.
This is handy if I want to abort the command,
but I found the behavior a little surprising the first time it happened.
My questions:
Why does this happen?
I know from the source code
thatedit_and_execute_commandeventually callsfc,
but it's not immediately clear to me
why sending SIGTSTP prevents bash from executing the temporary file.
If I had accidentally hit Ctrl-Z
and still wanted to execute the script in the temporary file still open by the editor,
what would be the best way of doing that?
bash signals line-editor fc
bash signals line-editor fc
edited 14 mins ago
Nathaniel M. Beaver
asked 1 hour ago
Nathaniel M. BeaverNathaniel M. Beaver
2722 silver badges20 bronze badges
2722 silver badges20 bronze badges
add a comment |
add a comment |
0
active
oldest
votes
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%2f528285%2fedit-and-execute-command-interrupted-by-sigtstp%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
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%2f528285%2fedit-and-execute-command-interrupted-by-sigtstp%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