diff --git a/completion/fish/task.fish b/completion/fish/task.fish
index a38a2130..cfe6ca61 100644
--- a/completion/fish/task.fish
+++ b/completion/fish/task.fish
@@ -1,6 +1,6 @@
 set GO_TASK_PROGNAME task
 
-function __task_get_tasks --description "Prints all available tasks with their description"
+function __task_get_tasks --description "Prints all available tasks with their description" --inherit-variable GO_TASK_PROGNAME
   # Read the list of tasks (and potential errors)
   $GO_TASK_PROGNAME --list-all 2>&1 | read -lz rawOutput