Weekly Shaarli

All links of one week in a single page.

Week 36 (August 31, 2020)

linux - Re run previous command with different arguments - Stack Overflow
thumbnail

:0 should do the trick. From the zsh documentation:

Word Designators
A word designator indicates which word or words of a given command line
are to be included in a history reference. A :' usually separates the event specification from the word designator. It may be omitted only if the word designator begins with a^', $',*', -' or%'. Word
designators include:

   0      The first input word (command).
   n      The nth argument.
   ^      The first argument.  That is, 1.
   $      The last argument.
   %      The word matched by (the most recent) ?str search.
   x-y    A range of words; x defaults to 0.
   *      All the arguments, or a null value if there are none.
   x*     Abbreviates `x-$'.
   x-     Like `x*' but omitting word $.

another explanation: https://unix.stackexchange.com/questions/318955/how-to-repeat-currently-typed-in-parameter-in-zsh

A crash course in sc - Cat on a Keyboard

sci-im is a little different, but most of the tips work there as well