Warn if `set` declares a huge variable. #1278

xfix opened this Issue Feb 1, 2014 · 1 comment

2 participants

The user-friendly shell member

My proposal is that if set would declare variable over 5MB (example size, may vary) in size, the fish shell would make a warning. It could be ignored by redirecting STDERR (or by specifying a flag for set, but provide a way to ignore this warning in case the user really means this). This is just an example, and I'm sure it could be cleaner.


$ set variable (over5mb)
fish: Variable $variable is assigned with a huge value. This is most likely is a bug.
set variable (over5mb)
The user-friendly shell member

This might have helped with diagnosing #842 #1038 and #1079 (as long as the warning is printed in batch mode).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment