Where Have You Been My Whole Life? bash : magic-space

https://relentlesscoding.com/posts/bash-magic-space/

https://unix.stackexchange.com/questions/3357/how-do-you-recall-the-last-n-th-passed-argument-of-the-previous-command-you-u

Put the following in your ~/.inputrc:

$if Bash
    Space: magic-space
$endif

And now, anytime you press a space, it substitutes the actual for the recall - so if you typed !!, you'll get the entire text of the previous command. Ditto for !$, !:2 (third word from previous command), etc.

Would definitely have saved Naseeba some work to know about this :) Though, I think the & thing alone was worth it :)

Comments

Popular Posts