idank / explainshell

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

Support prompt expansions #326

Open wwolfe-mend opened 1 month ago

wwolfe-mend commented 1 month 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 :&