Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Keyboard Macro?



zzapper <david@xxxxxxxxxx>:
> I much too frequently write the following
> 
> cp _!^ _!$
> 
> Which I'd like to shorten somehow and save my sore pinkies.
> 
> Ideally I'd use an alias but aliases don't know about history commands.
> I guess I could write a script, but what I'd really like is some kind of 
> keyboard macro which would spit out the above if I typed say cpfl (copy first 
> to last)
> 
> Ideas? I'd use Shortkeys but that doesn't work on De-Vista-ted

Maybe:

  bindkey -s '^xC' 'cp _!\^ _!$'

or even:

  bindkey -s '^xC' 'cp _!\^ _!$'$'\n'

Regards, Frank

-- 
In protocol design, perfection has been reached not when there is
nothing left to add, but when there is nothing left to take away.
                                                  -- RFC 1925



Messages sorted by: Reverse Date, Date, Thread, Author