Hey Liv,

Is there a way to get fish to do something only when run inside a terminal 
window?

sure, you could just check for `status --is-interactive` (see 
https://fishshell.com/docs/current/cmds/status.html).
Btw, this is also how fish_greeting is called internally, see 
/usr/share/fish/functions/__fish_config_interactive.fish line 110.

But from what I understand, fish_greeting should be the right place to do what 
you want.

But it turns out that things I put in fish_greeting are also triggered
when I run a fish command alias via a keyboard shortcut, e.g. by using
XFCE's keyboard settings dialogue to associate 'fish -c my-alias-here'
with a key combination.

maybe XFCE invokes an interactive terminal to run that command? Because when I 
do `fish -c…` the greeting is not printed, but it is when I open another 
session with just `fish`.

paul
--
❤ https://neo-layout.orghttps://useplaintext.email
❤ YY-MM-DD (ISO 8601/RFC 3339)
� UTF-8
☠ please don't TOFU! https://en.wikipedia.org/wiki/Posting_style



_______________________________________________
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to