| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | .\" $NetBSD: sh.1,v 1.145 2017/05/27 11:19:57 kre Exp $ | | 1 | .\" $NetBSD: sh.1,v 1.146 2017/06/02 17:42:51 abhinav Exp $ |
2 | .\" Copyright (c) 1991, 1993 | | 2 | .\" Copyright (c) 1991, 1993 |
3 | .\" The Regents of the University of California. All rights reserved. | | 3 | .\" The Regents of the University of California. All rights reserved. |
4 | .\" | | 4 | .\" |
5 | .\" This code is derived from software contributed to Berkeley by | | 5 | .\" This code is derived from software contributed to Berkeley by |
6 | .\" Kenneth Almquist. | | 6 | .\" Kenneth Almquist. |
7 | .\" | | 7 | .\" |
8 | .\" Redistribution and use in source and binary forms, with or without | | 8 | .\" Redistribution and use in source and binary forms, with or without |
9 | .\" modification, are permitted provided that the following conditions | | 9 | .\" modification, are permitted provided that the following conditions |
10 | .\" are met: | | 10 | .\" are met: |
11 | .\" 1. Redistributions of source code must retain the above copyright | | 11 | .\" 1. Redistributions of source code must retain the above copyright |
12 | .\" notice, this list of conditions and the following disclaimer. | | 12 | .\" notice, this list of conditions and the following disclaimer. |
13 | .\" 2. Redistributions in binary form must reproduce the above copyright | | 13 | .\" 2. Redistributions in binary form must reproduce the above copyright |
14 | .\" notice, this list of conditions and the following disclaimer in the | | 14 | .\" notice, this list of conditions and the following disclaimer in the |
| @@ -2092,27 +2092,27 @@ as they were before the | | | @@ -2092,27 +2092,27 @@ as they were before the |
2092 | .Ic local | | 2092 | .Ic local |
2093 | declaration, restored when the function terminates. | | 2093 | declaration, restored when the function terminates. |
2094 | .Pp | | 2094 | .Pp |
2095 | With the | | 2095 | With the |
2096 | .Fl N | | 2096 | .Fl N |
2097 | flag, variables made local, are unset initially inside | | 2097 | flag, variables made local, are unset initially inside |
2098 | the function. | | 2098 | the function. |
2099 | Unless the | | 2099 | Unless the |
2100 | .Fl x | | 2100 | .Fl x |
2101 | flag is also given, such variables are also unexported. | | 2101 | flag is also given, such variables are also unexported. |
2102 | The | | 2102 | The |
2103 | .Fl I | | 2103 | .Fl I |
2104 | flag, which is the default in this shell, causes | | 2104 | flag, which is the default in this shell, causes |
2105 | the initial value and exported atribute | | 2105 | the initial value and exported attribute |
2106 | of local variables | | 2106 | of local variables |
2107 | to be inherited from the variable | | 2107 | to be inherited from the variable |
2108 | with the same name in the surrounding | | 2108 | with the same name in the surrounding |
2109 | scope, if there is one. | | 2109 | scope, if there is one. |
2110 | If there is not, the variable is initially unset, | | 2110 | If there is not, the variable is initially unset, |
2111 | and not exported. | | 2111 | and not exported. |
2112 | The | | 2112 | The |
2113 | .Fl N | | 2113 | .Fl N |
2114 | and | | 2114 | and |
2115 | .Fl I | | 2115 | .Fl I |
2116 | flags are mutually exclusive, if both are given, the last specified applies. | | 2116 | flags are mutually exclusive, if both are given, the last specified applies. |
2117 | The read-only and unexportable attributes are always | | 2117 | The read-only and unexportable attributes are always |
2118 | inherited, if a variable with the same name already exists. | | 2118 | inherited, if a variable with the same name already exists. |