top | item 46923274

(no title)

alzee | 23 days ago

Using commas in filenames feels kind of weird to me, but I do use a comma as the initiator for my Bash key sequences. For example: ,, expands to $ ,h expands to --help ,v expands to --version ,s prefixes sudo

You put keyseqs in ~/.inputc, set a keyseq-timeout, and it just works.

discuss

order

zahlman|23 days ago

You could also do this sort of thing with XCompose, yes?

pmarreck|23 days ago

would an alias just work in this use-case?

listeria|23 days ago

Global aliases are a zsh feature and not avaliable in bash. So if you want:

  openssl ,v
to expand to...

  openssl --version
readline seems like the way to go.

Then again most of the examples OP gave are usually available as short options, and aliasing ,s to sudo is certainly possible. So the only one which makes sense to me is ,,=$. But it's probably not worth the trouble to my muscle memory.

pmarreck|23 days ago

also. did you mean .inputrc ?

alzee|22 days ago

Yes, I meant ~/.inputrc .