Text-Expansion: how to incorporate commandline-output into replacement-strings? // Text-expansion only working for pure string-to-string replacements. #342
-
|
Consider the examples provided in the wiki-section on text-expansion. I have been wholly unable to replicate any text replacement which is not exclusively of the type This unfortunately also means the successful execution of shell commands to place their output into the replacement-string is (seemingly) not possible. This happens for exclusively every instance set up this way. into Nonetheless, none of the command outputs - whichever way I seem to try to construct them - actually inserts command results. Normal, pure-text replacements like will work, but anything that requires any sort of command evaluation will just not. I have honestly no real clue why this is the case. I am running Mint 22.2 Zara, using keymapper(d) are symlinked to All in all, I am at the end of my rope here. At this point I am not even sure if what I am trying to do / what I understand the example should do actually lines up with what it is actually doing, or if there is something uniquely strange going on here. Hopefully I am just really really stupid and I'm missing something here. Besides that, thank you for this utility. Coming from Windows with a massive amount of self-written hotkeys via Autohotkey, switching to linux has been daunting. Being able to re-implement at least some portion of those even makes this viable. Sincerely, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Hi, this is from the corresponding section of the README: # when last character of string is typed, undo using backspace and output new string
substitute = ? "$0" >> repeat[Backspace, sub[length["$0"], 1]] "$1"
substitute["Cat", "Dog"]
# generate the string to output with an external program
substituteExec = ? "$0" >> repeat[Backspace, sub[length["$0"], 1]] \
$(keymapperctl --type "$($1)")
substituteExec[":whoami", "whoami"]So, you would have to put this in your configuration: |
Beta Was this translation helpful? Give feedback.
Hi, this is from the corresponding section of the README:
So, you would have to put this in your configuration: