Skip to main content

is_portable_readonly_variable_name

Function is_portable_readonly_variable_name 

Source
pub fn is_portable_readonly_variable_name(name: &str) -> bool
Expand description

Tests if a variable may be made read-only in a POSIXly-portable way.

POSIX requires the shell to be able to update the PWD, OLDPWD, OPTIND, OPTARG, and LINENO variables during normal operation, so making any of them read-only is not portable. This function returns false for these five variable names and true for any other name.