Hacker News new | ask | show | jobs
by da39a3ee 1906 days ago
vaguely related I also have a redis shell prompt hack to allow changing an env var in all your shell processes:

  __set_env_vars_from_redis () {
      eval $(redis-cli --raw hgetall env |\
             awk '{i = (NR - 1) % 2; args[i] = $1; if(i == 1) { printf("export %s=%s\n", args[0], args[1]) }}')
  }
If you call that function in your shell prompt command, then you can do stuff like

  redis-cli hset env BAT_THEME 'Dracula'