Skip to main content
expanded abbreviation
Source Link
Jeff Schaller
  • 68.8k
  • 35
  • 122
  • 264

Is it possible to implement a local export in zsh? Possibly using try and always?

Does this create race-conditions?

By local export"local export", I mean sthsomething exactly like a local variable, that is accessible to the subprocesses (in scope).

Example:

function a() {
 local export YACY_TIMEOUT=60
 yacy -r -d sth
 }
 export YACY_TIMEOUT=4
 echo "$YACY_TIMEOUT" # 4
 a
 echo "$YACY_TIMEOUT" # 4

Is it possible to implement a local export in zsh? Possibly using try and always?

Does this create race-conditions?

By local export, I mean sth exactly like a local variable, that is accessible to the subprocesses (in scope).

Example:

function a() {
 local export YACY_TIMEOUT=60
 yacy -r -d sth
 }
 export YACY_TIMEOUT=4
 echo "$YACY_TIMEOUT" # 4
 a
 echo "$YACY_TIMEOUT" # 4

Is it possible to implement a local export in zsh? Possibly using try and always?

Does this create race-conditions?

By "local export", I mean something exactly like a local variable, that is accessible to the subprocesses (in scope).

Example:

function a() {
 local export YACY_TIMEOUT=60
 yacy -r -d sth
 }
 export YACY_TIMEOUT=4
 echo "$YACY_TIMEOUT" # 4
 a
 echo "$YACY_TIMEOUT" # 4
Tweeted twitter.com/StackUnix/status/1159479503485317127
added 185 characters in body
Source Link
HappyFace
  • 1.7k
  • 14
  • 29

Is it possible to implement a local export in zsh? Possibly using try and always?

Does this create race-conditions?

By local export, I mean sth exactly like a local variable, that is accessible to the subprocesses (in scope).

Example:

function a() {
 local export YACY_TIMEOUT=60
 yacy -r -d sth
 }
 export YACY_TIMEOUT=4
 echo "$YACY_TIMEOUT" # 4
 a
 echo "$YACY_TIMEOUT" # 4

Is it possible to implement a local export in zsh? Possibly using try and always?

Does this create race-conditions?

By local export, I mean sth exactly like a local variable, that is accessible to the subprocesses (in scope).

Is it possible to implement a local export in zsh? Possibly using try and always?

Does this create race-conditions?

By local export, I mean sth exactly like a local variable, that is accessible to the subprocesses (in scope).

Example:

function a() {
 local export YACY_TIMEOUT=60
 yacy -r -d sth
 }
 export YACY_TIMEOUT=4
 echo "$YACY_TIMEOUT" # 4
 a
 echo "$YACY_TIMEOUT" # 4
Source Link
HappyFace
  • 1.7k
  • 14
  • 29

zsh: Is it possible to implement a `local export`?

Is it possible to implement a local export in zsh? Possibly using try and always?

Does this create race-conditions?

By local export, I mean sth exactly like a local variable, that is accessible to the subprocesses (in scope).