Skip to main content

All Questions

0 votes
1 answer
496 views

Global Variables across scripts [duplicate]

Why is lets say HOME recognized by all my scripts but my variable DMENU isn't? I export it in my bspwmrc file which is executed at start up.Also had it in my zshrc. Why do this? DMENU="-h 27 -z ...
Lampros's user avatar
  • 143
0 votes
1 answer
731 views

How do I make the frontend non-interactive in Arch Linux?

In Debian, we have a variable called DEBIAN_FRONTEND, which when set to noninteractive stops prompting and is useful in scripts. Do we have an equivalent in archlinux? Because, 'echo y | ' is really ...
kesarling's user avatar
  • 159
2 votes
3 answers
909 views

How to capture stderr of function that modifies current environment?

The module function of the Environment Modules1 package does its work by modifying various environment variables of the current shell process. Unfortunately, this function returns 0 whether it ...
kjo's user avatar
  • 16.2k
3 votes
2 answers
3k views

Updating shell functions and aliases through environment variables

Say we define the following shell function and alias in .zshenv: export VARIABLE_A='original' function my_function() { print $VARIABLE_A } export VARIABLE_B='original' alias my_alias="print $...
Amelio Vazquez-Reina's user avatar
11 votes
2 answers
22k views

Local variables in zsh: what is the equivalent of bash's "export -n" in zsh

I'm trying to contain the scope of a variable to a shell, and not have children see it, in zsh. For example, I type this in .zshrc: GREP_OPTIONS=--color=always But if I run a shell script with the ...
PonyEars's user avatar
  • 234