ALT+PERIOD CYCLES THROUGH PREVIOUS ARGUMENTS IN BASH

Solvedbashlinuxshell-history8 replies · 312 views · started
Accepted solution by Arjun — fc opens your last command in your editor so you can fix a long command before rerunning it.
  1. so annoyed rn i just learned that !! in bash means "previous command", so sudo !! reruns teh last command as root, i also found Alt+... which pastes the last argument of teh previous command where my cursor is... press it repeatedly to go back through earlier commands last arguments.

    I edited a file with nano /etc/some/long/path.conf and then ran cat and pressed Alt+. instead of typing the path again. why did nobody tell me this in school? seriously need help here 😭

    2
  2. shopt -s histverify in bash makes history expansions appear on the command line for editing before they run. Safer for ! commands.

    1 1 helpful
  3. lol this thread is gold... honestly just reset teh DNS and save yourself the pain what am i doing wrong??

    facepalm

    0 6 helpful
  4. ok so try turning off the power plan first, fixed it for me good luck man!

    day one patch is bigger than the actual game, classic

    0 0 helpful
  5. hmmm in zsh, setopt HIST_VERIFY does the same, and pressing Tab right after !! expands it in place sooo u can check it first. hope that helps :)

    have u tried turning it off and on again (im only half joking)

    0 1 helpful

Reply to this topic

Sign in or create an account to reply.