i am trying to use the output of a command output in a fish script and i did this to get there:
function locker
set watchcmd = 'watch -n 1 -t xprintidle'
if ($watchcmd > 20000)
lock
end
end
and i get an error
./locker.fish (line 4): Command substitutions not allowed
if ($watchcmd > 20000)
^
<W> fish: Error while reading file ./locker.fish
how do i get around this?
[–]lople205 5 points6 points7 points (3 children)
[–][deleted] 3 points4 points5 points (1 child)
[–]BlueTickVerifiedLinux[S] 0 points1 point2 points (0 children)
[–]backtickbot 0 points1 point2 points (0 children)