Quantcast
Channel: Active questions tagged fish - Stack Overflow
Viewing all articles
Browse latest Browse all 130

How to get the full current command in Fish Shell

$
0
0

I want to build a notification with info about the current command using terminal-notifier but I fail to find the way to get the current command, marked as (????) below.

alias notify=terminal-notifier -message "Done with [(????)]" -title (if test $status = 0; echo "$_ suceeded"; else; echo "$_ exited with error [$status]"; end) -sound default -ignoreDnD

Where I'd use it as echo 1; notify and the message would be Done with [echo 1;notify]

I have tried $_, status current-command and commandline but neither include the parameters or what's after the pipe. history | head -n1 doesn't have the command until after it's executed.


Viewing all articles
Browse latest Browse all 130

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>