wakatime/wakatime-cli

Unknown editor

noahfraiture opened this issue · 1 comments

Hello, I made an unofficial Helix wakatime plugin with a simple bash script

#!/bin/bash
echo "[$(date +%s)] wakatime send : $1" >>/home/noah/.config/helix/wakatime.log && 
wakatime-cli --entity "$1" --plugin "Helix/version Helix/version" --write 2>&1 >/dev/null &&

for i in {1..3}
do
echo "[$(date +%s)] wakatime send : $1. Iteration $i" >>/home/noah/.config/helix/wakatime.log && 
  wakatime-cli --entity "$1" --plugin "Helix/$(hx --version | cut -d' ' -f2) Helix-wakatime/$(hx --version | cut -d' ' -f2)" 2>&1 >/dev/null
  sleep 120
done

The problem is that on my dashboard the editor is unknown
image
How can I resolve this issue ?

  • OS: Linux
  • Platform: x86_64

This line is the problem:

wakatime-cli --entity "$1" --plugin "Helix/version Helix/version" --write 2>&1 >/dev/null

Instead of sending the real version it's sending version. If you send any number instead, like 0, or the real helix version like you do below then it detects Helix correctly:
--plugin "Helix/$(hx --version | cut -d' ' -f2) Helix-wakatime/$(hx --version | cut -d' ' -f2)"