Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Trigger to add corrected spellings to my_spellings.yml
- # Copy incorrect and correct words and type ":sp"
- - trigger: :sp
- replace: "{{output}}"
- vars:
- - name: clip
- type: clipboard
- - name: output
- type: shell
- params:
- shell: bash
- cmd: |
- if [ $(echo "$ESPANSO_CLIP" | wc -w) -ne 2 ]; then exit 0; fi
- first_word=$(echo "$ESPANSO_CLIP" | awk '{print $1}')
- second_word=$(echo "$ESPANSO_CLIP" | awk '{print $2}')
- echo " - trigger: \"$first_word\"" >> $CONFIG/match/my_spellings.yml
- echo " replace: \"$second_word\"" >> $CONFIG/match/my_spellings.yml
- echo " word: true" >> $CONFIG/match/my_spellings.yml
- echo $second_word
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement