Skip to content

Commit

Permalink
Merge pull request #2 from ik11235/fix/no_exec_error_fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ik11235 authored Dec 28, 2022
2 parents 1ce8f4c + 1854881 commit defd91a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions functions/wakatime.fish → conf.d/wakatime.fish
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# see: https://github.com/ik11235/wakatime.fish
###

function register_wakatime_fish_before_exec -e fish_preexec
function __register_wakatime_fish_before_exec -e fish_preexec
set -l PLUGIN_NAME "ik11235/wakatime.fish"
set -l PLUGIN_VERSION "0.0.1"

Expand All @@ -21,11 +21,11 @@ function register_wakatime_fish_before_exec -e fish_preexec
return 1
end

if git rev-parse --is-inside-work-tree 2>&1 > /dev/null
if git rev-parse --is-inside-work-tree &> /dev/null
set project (basename (git rev-parse --show-toplevel))
else
set project "Terminal"
end

$wakatime_path --write --plugin "$PLUGIN_NAME/$PLUGIN_VERSION" --entity-type app --project "$project" --entity (echo $history[1] | cut -d ' ' -f1) 2>&1 > /dev/null&
$wakatime_path --write --plugin "$PLUGIN_NAME/$PLUGIN_VERSION" --entity-type app --project "$project" --entity (echo $history[1] | cut -d ' ' -f1) &> /dev/null&
end

0 comments on commit defd91a

Please sign in to comment.