1

screen offers this functionality:

bindkey -t foo stuff barfoo
   Make  "foo"  an  abbreviation of the word "barfoo".
   Timeout is disabled so that users can type slowly.

I use(d) this for e.g.

bindkey -t .,u stuff user.name
bindkey -t .,U stuff User.Name
bindkey -t .,E stuff [email protected]

and so forth.

But now I moved to tmux, for various reasons, and am having difficulties replicating this behavior/functionality on tmux.

When trying to bind e.g. '.,E' I get an "unknown key" error from tmux.

Alex Stragies
  • 5,857
  • 2
  • 32
  • 56

1 Answers1

2

tmux doesn't have this functionality. It uses a single key in each key-table, with modifiers. Some keys have names see here for a list.

If you are using a program such as bash that uses the gnu readline library then you can use it to do the conversion.

Using bash

bind '".,u":"user.Name"'
bind '".,U":"User.Name"'
bind '".,E":"[email protected]"'

See readline manual for more information.

icarus
  • 17,420
  • 1
  • 37
  • 54