Comments (5)
Apologies - I failed to copy the final "'" (single inverted comma) at the end of the last line. I've added it above and checked it works here.
from espanso.
Thanks! I think this should be added to the documentation, it's an amazing tool!
from espanso.
It's not too difficult. Here's a script I wrote in response to a user's query on Discord recently, which builds on the examples in the docs:
- trigger: :atest
replace: "{{output}}"
vars:
- name: form1
type: form
params:
layout: "[[choices]]"
fields:
choices:
type: choice
values: |
one
two
three
- name: output
type: shell
params:
cmd: echo $"{{form1.choices}}" | sed 's/one/four/;s/two/five/;s/three/six/'
By making the form a named variable, it takes its output and makes it available for a script to change the output for the replace:
. If you want to try it, the last line may need altering to suit your OS and shell, but it illustrates the principle.
from espanso.
If this answers your question, I'll close the Issue. If I've misunderstood, please let me know!
from espanso.
Sorry, I couldn't check it until now.
I copied/pasted it in a new file called scripts.yml in the same folder, but got this error: [Espanso]: An error occurred during rendering, please examine the logs for more information.
I tried it with the three options and still got the same result. I also added the force_mode: clipboard
that we talked about in another issue.
EDIT: found the log!
12:06:34 [worker(56269)] [ERROR] shell command exited with code: exit status: 2 and error: bash: -c: línea 1: EOF inesperado mientras se buscaba un `'' coincidente
12:06:34 [worker(56269)] [WARN] extension 'shell' on var: 'output' reported an error: command reported error: '`bash: -c: línea 1: EOF inesperado mientras se buscaba un `'' coincidente
`'
12:06:34 [worker(56269)] [ERROR] error during rendering: rendering error
Caused by:
command reported error: '`bash: -c: línea 1: EOF inesperado mientras se buscaba un `'' coincidente
`'
English translation:
12:06:34 [worker(56269)] [ERROR] shell command exited with code: exit status: 2 and error: bash: -c: line 1: Unexpected EOF while searching for a matching ``''
12:06:34 [worker(56269)] [WARN] extension 'shell' on var: 'output' reported an error: command reported error: '`bash: -c: line 1: Unexpected EOF while searching for a `' ' coincident
''
12:06:34 [worker(56269)] [ERROR] error during rendering: rendering error
Caused by:
command reported error: '`bash: -c: line 1: Unexpected EOF while searching for a matching `''
''
from espanso.
Related Issues (20)
- Espanso not working, window not rendering + "Unknown" app in dock (Ubuntu/Wayland) HOT 4
- espanso will only use system-installed interpreters HOT 6
- `Cargo.lock` is difficult to create from scratch
- ensure espanso works with screen readers and other assistive tools HOT 3
- Can't get espanso running at all on Fedora / Wayland KDE Plasma HOT 4
- can't exclude espanso in specific apps HOT 2
- Replacement only works some of the time HOT 13
- Using trigger with regex conditioned replacement text HOT 6
- Python throws an error when the clipboard contains newline. HOT 3
- Animated gifs paste incorrectly in certain apps HOT 1
- link to config file/match folder in the taskbar right click menu HOT 3
- espanso periodically stops triggering HOT 1
- The candidate input method is being replaced while typing, not after typing.
- Espanso tray Icon is difficult to see with Light color mode (Windows) HOT 2
- Reactive input for filtering files
- null
- emoji representation in search bar HOT 4
- Search shortcut: `CMD+F4` key combination not working HOT 3
- Portable Espanso on Windows does not override installed copy HOT 5
- Switching Layouts restarts SyncTool and takes focus
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from espanso.