Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

CTRL-x-r will reload it as well, without having to restart your shell


sort by: page size:

When launching it, the user can just wrap it in 'while true ; do .... ; done' and hey presto, 'q' is the refesh key.

Command + R (If you're on a Mac)

or whatever you do to refresh.


Or cmd + R

Indeed!

I sometimes use emacs and use an after-save-hook to send a command (e.g. to reload a file).


No, it doesn't. It just drops you to another shell prompt.

I usually don't have to. I just close the cmd window and reopen it and it's usually updated on load.

If you hit shift+run stop at the end of the command it'd load and run.

Cool. I was unfamiliar with this command. Looks useful.

It is very useful just be careful when switching between shells and hitting the up arrow to get the previous command, as you may get something from another shell.

cmd also works.

Command + R also does this.

oh... so can I type !id to re-run the command?

Ctrl-r tsc will also work, and give you the ability to refine and run the command directly.

You can also use Cmd + Return.

Off topic hijack - I'm trying to find a tool I feel was probably mentioned here at one point - a REPL for shell.

If I recall correctly, you would open up the repl and start typing a command, and the output would refresh as you typed. Does this ring a bell for anyone?


> When I need to do it I like to do it from a regular prompt: I just switch to an actual terminal

You might like exploring using async-shell-command for these things.

If you like that, you may also like detached.el for command rerunning and command output history.


CMD + Q.

Try it sometime. It's an effective shortcut.


Thanks for the second link. I go there every few weeks but never thought to check out the top voted.

...In hindsight, of course...

The gem I just plucked out is something I've been curious about for a while but never looked up:

    CTRL-X e
    
    The shell will take what you've written on the command 
    line thus far and paste it into the editor specified by 
    $EDITOR [then run it when saved]
Similar to `fc` except you don't need to run the command before invoking the editor

bash control-r. If you don't know what I'm talking about, go try it.
next

Legal | privacy