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)
- Excessive RAM usage HOT 5
- upgrade the `widestring` dependency
- Inform the least MSRV (minimum-supported Rust version) HOT 1
- Not working properly on Wayland after ':' shortcut HOT 2
- Improve description of Compilation on Windows HOT 1
- thread 'main' panicked at 'unable to load config: unable to load config HOT 5
- Documentation update list HOT 1
- Failing to compile espanso HOT 2
- update `clap`
- Install Wayland DEB on Debian 12 error libwx_gtk3u_html-3.0.so.0 HOT 36
- I have a permanent opened app on fedora 39 HOT 13
- Search window not in focus when powertoys keyboard manager is running
- Have to type each trigger twice HOT 4
- Replacement doesn't work correctly on Kate ``` python HOT 7
- I get additional ] at the 2nd Position and Position of Cursor jumps HOT 1
- Wrong or no replacement in Win11 and Win10 HOT 5
- MacOS brew installation docs should be updated
- Incorrect case propagation for the eszett character (ß) HOT 2
- Cinnamon Icon HOT 2
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.