style: format fish files with fish_indent

This commit is contained in:
2026-09-09 20:27:48 -04:00
parent 2dc978e719
commit e40d67df59
58 changed files with 1184 additions and 1015 deletions
+27 -26
View File
@@ -20,37 +20,38 @@ __fish_config_op_enabled (status basename) wakatime-autoexec; or exit
__fish_config_op_enabled (status basename) wakatime-hook; or exit
function __register_wakatime_fish_before_exec -e fish_postexec
if set -q FISH_WAKATIME_DISABLED
return 0
end
set -l exec_command_str
if set -q FISH_WAKATIME_DISABLED
return 0
end
set exec_command_str (string split -f1 ' ' "$argv")
set -l exec_command_str
if test "$exec_command_str" = 'exit'
return 0
end
set exec_command_str (string split -f1 ' ' "$argv")
set -l PLUGIN_NAME "ik11235/wakatime.fish"
set -l PLUGIN_VERSION "0.0.6"
if test "$exec_command_str" = exit
return 0
end
set -l project
set -l wakatime_path
set -l PLUGIN_NAME "ik11235/wakatime.fish"
set -l PLUGIN_VERSION "0.0.6"
if type -p wakatime 2>&1 > /dev/null
set wakatime_path (type -p wakatime)
else if type -p ~/.wakatime/wakatime-cli 2>&1 > /dev/null
set wakatime_path (type -p ~/.wakatime/wakatime-cli)
else
return 1
end
set -l project
set -l wakatime_path
if git rev-parse --is-inside-work-tree &> /dev/null
set project (basename (git rev-parse --show-toplevel))
else
set project "Terminal"
end
if type -p wakatime 2>&1 >/dev/null
set wakatime_path (type -p wakatime)
else if type -p ~/.wakatime/wakatime-cli 2>&1 >/dev/null
set wakatime_path (type -p ~/.wakatime/wakatime-cli)
else
return 1
end
$wakatime_path --write --plugin "$PLUGIN_NAME/$PLUGIN_VERSION" --entity-type app --project "$project" --entity "$exec_command_str" &> /dev/null&; disown
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 "$exec_command_str" &>/dev/null &
disown
end