antonmedv / watch

watch tool rewritten in go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Inherit some or all of parent environment

focusaurus opened this issue · comments

What do you think about trying to retain some/all/more of the current environment variables when launching the child process? Aliases are helpful, but often my aliases and functions depend upon environment like AWS_PROFILE etc and at the moment as far as I can tell the environment gets reset.

I can work around by 1-by-1 specifying them like:

WATCH_COMMAND='zsh -ci' /usr/local/bin/watch "n=${n}; echo hey n: ${n} hey"

But it's tedious and I assume there's nasty escaping issues in there too.

This is a good idea

Maybe someone willing to create this is PR?