10

I use vim and snipmate a lot for my python programming. It would be ideal if I could have a snippet system for the bash command line. Right now I use the gnome terminal in ubuntu...

For instance, if I type:

for<TAB>

I get:

for i in {1..50}; do SOMETHING; done

My google foo fails me, so once again I'm turning to SO. Any ideas?

tshepang
  • 12,111
  • 21
  • 91
  • 136
sequenceGeek
  • 767
  • 1
  • 8
  • 20
  • I'm not aware of some sort of "plugin" for this, but you could hack the completion scripts if you really wanted to. – Kevin Feb 08 '12 at 04:00
  • pet - https://linoxide.com/linux-how-to/pet-command-line-snippet-manager-linux/ – Gelldur May 28 '18 at 10:04

4 Answers4

7

There are several implementations:

Boom

Bang

Sheet

user673592
  • 2,090
  • 1
  • 22
  • 37
5

If you're looking for a tool that let you expand macros, you can use autokey.

jcollado
  • 39,419
  • 8
  • 102
  • 133
0

You could also look into marker for both bash and zsh which features

  • search
  • placeholders
  • easy saving

Can be found at https://github.com/pindexis/marker

jeykey
  • 9
  • 3
0

There is Komandi, a multiplatform command snippets manager.