make zsh run a command when no command is entered Unicorn Meta Zoo #1: Why another podcast? ...
Could moose/elk survive in the Amazon forest?
Is accepting an invalid credit card number a security issue?
Would reducing the reference voltage of an ADC have any effect on accuracy?
Expansion//Explosion and Siren Stormtamer
With indentation set to `0em`, when using a line break, there is still an indentation of a size of a space
Could Neutrino technically as side-effect, incentivize centralization of the bitcoin network?
Multiple options vs single option UI
As an international instructor, should I openly talk about my accent?
I preordered a game on my Xbox while on the home screen of my friend's account. Which of us owns the game?
Protagonist's race is hidden - should I reveal it?
What was Apollo 13's "Little Jolt" after MECO?
A Paper Record is What I Hamper
Is there any hidden 'W' sound after 'comment' in : Comment est-elle?
How to keep bees out of canned beverages?
Raising a bilingual kid. When should we introduce the majority language?
What is it called when you ride around on your front wheel?
Is it OK if I do not take the receipt in Germany?
What to do with someone that cheated their way through university and a PhD program?
Book with legacy programming code on a space ship that the main character hacks to escape
Are these square matrices always diagonalisable?
Did the Roman Empire have penal colonies?
PIC mathematical operations weird problem
Justification for leaving new position after a short time
Reattaching fallen shelf to wall?
make zsh run a command when no command is entered
Unicorn Meta Zoo #1: Why another podcast?
Announcing the arrival of Valued Associate #679: Cesar Manara
2019 Community Moderator Election Results
Why I closed the “Why is Kali so hard” questionZSH to auto-complete directories in command-line arguments?Terminal with “repeat last” buttonCancel completion, but only completion, in zshWhat allows a command to be typed while the previous command is still running in foreground?How to have type-ahead apply to bash history search (Ctrl-R)?How do I set the editor command to use *only* for edit-command-line in zsh?Delete keymap and completely disable key in zshRun/stop command in terminal without human interference?Open in vim from zsh on `filename<cr>`, maybe preexec hook?wall forces everyone to input something to get back to the prompt
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
Imagine I am typing at my terminal prompt, but actually decide not to type anything. Instead I just press enter.
Is there a way I can make zsh run a command now?
I want to potentially make this command variable, e.g. repeat the last command, or if the last command was z
then pressing enter on the blank prompt should run echo $PWD
.
How can I do this?
terminal zsh
add a comment |
Imagine I am typing at my terminal prompt, but actually decide not to type anything. Instead I just press enter.
Is there a way I can make zsh run a command now?
I want to potentially make this command variable, e.g. repeat the last command, or if the last command was z
then pressing enter on the blank prompt should run echo $PWD
.
How can I do this?
terminal zsh
you might find some options with superuser.com/a/625663/513541, although I'd point out that "an empty command" is vastly different than the non-empty command "z
". I, myself, struck out on theTRAPDEBUG()
route -- an empty command seems not to trigger it.
– Jeff Schaller♦
2 hours ago
add a comment |
Imagine I am typing at my terminal prompt, but actually decide not to type anything. Instead I just press enter.
Is there a way I can make zsh run a command now?
I want to potentially make this command variable, e.g. repeat the last command, or if the last command was z
then pressing enter on the blank prompt should run echo $PWD
.
How can I do this?
terminal zsh
Imagine I am typing at my terminal prompt, but actually decide not to type anything. Instead I just press enter.
Is there a way I can make zsh run a command now?
I want to potentially make this command variable, e.g. repeat the last command, or if the last command was z
then pressing enter on the blank prompt should run echo $PWD
.
How can I do this?
terminal zsh
terminal zsh
asked 3 hours ago
theonlygustitheonlygusti
25918
25918
you might find some options with superuser.com/a/625663/513541, although I'd point out that "an empty command" is vastly different than the non-empty command "z
". I, myself, struck out on theTRAPDEBUG()
route -- an empty command seems not to trigger it.
– Jeff Schaller♦
2 hours ago
add a comment |
you might find some options with superuser.com/a/625663/513541, although I'd point out that "an empty command" is vastly different than the non-empty command "z
". I, myself, struck out on theTRAPDEBUG()
route -- an empty command seems not to trigger it.
– Jeff Schaller♦
2 hours ago
you might find some options with superuser.com/a/625663/513541, although I'd point out that "an empty command" is vastly different than the non-empty command "
z
". I, myself, struck out on the TRAPDEBUG()
route -- an empty command seems not to trigger it.– Jeff Schaller♦
2 hours ago
you might find some options with superuser.com/a/625663/513541, although I'd point out that "an empty command" is vastly different than the non-empty command "
z
". I, myself, struck out on the TRAPDEBUG()
route -- an empty command seems not to trigger it.– Jeff Schaller♦
2 hours ago
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%2f515356%2fmake-zsh-run-a-command-when-no-command-is-entered%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%2f515356%2fmake-zsh-run-a-command-when-no-command-is-entered%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
you might find some options with superuser.com/a/625663/513541, although I'd point out that "an empty command" is vastly different than the non-empty command "
z
". I, myself, struck out on theTRAPDEBUG()
route -- an empty command seems not to trigger it.– Jeff Schaller♦
2 hours ago