idank / explainshell

match command-line arguments to their help text
GNU General Public License v3.0
13.29k stars 794 forks source link

Support prompt expansions #326

Open wwolfe-mend opened 6 months ago

wwolfe-mend commented 6 months ago

Support prompt expansions

Examples

!! - all items, repeat the previous line
!* - just args
!:3  just 3rd item
!^      first argument
!$      last argument # or hit esc period
!*      all arguments
!:2     second argument

!:2-3   second to third arguments
!:2-$   second to last arguments
!:2*    second to last arguments
!:2-    second to next to last arguments

!:0     the command
!:-2  first 2 items

# substitutions
^WORD1^WORD2^
!!:s/WORD1/WORD2

!!:gs/old/new/ or :&