tenseleyflow/parrot / 77cfd69

Browse files

fix fish hook using history with timestamps instead of argv

Authored by mfwolffe <wolffemf@dukes.jmu.edu>
SHA
77cfd69efe39528cec894f8d3ca4e09add08cc73
Parents
6849708
Tree
fa08be7

1 changed file

StatusFile+-
M parrot-hook.fish 2 1
parrot-hook.fishmodified
@@ -14,9 +14,10 @@ function parrot_check
1414
 end
1515
 
1616
 # Function called after each command completes
17
+# Note: fish_postexec receives the command as $argv[1]
1718
 function parrot_postexec --on-event fish_postexec
1819
     set -l exit_code $status
19
-    set -l last_cmd (history max 1)
20
+    set -l last_cmd $argv[1]
2021
 
2122
     # Only mock if command failed and we have a command
2223
     if test $exit_code -ne 0; and test -n "$last_cmd"; and parrot_check