-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch b_enum() from optget() to getopt_long()
- Loading branch information
1 parent
bc155a2
commit c3a2b14
Showing
7 changed files
with
78 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
.. default-role:: code | ||
|
||
:index:`enum` -- create an enumeration type | ||
=========================================== | ||
|
||
Synopsis | ||
-------- | ||
| enum [flags] *typename*[ `=(` *value* ... `)` ] | ||
Description | ||
----------- | ||
`enum` is a declaration command that creates an enumeration type *typename* | ||
that can only store any one of the values in the indexed array variable | ||
*typename*. | ||
|
||
If the list of *value*s is omitted, then *typename* must name an indexed | ||
array variable with at least two elements. | ||
|
||
When an enumeration variable is used in an arithmetic expression, its | ||
value is the index into the array that defined it starting from index | ||
0. Enumeration strings can be used in an arithmetic expression when | ||
comparing against an enumeration variable. | ||
|
||
The enum `_Bool` exists by default with values `true` and `false`. The | ||
predefined alias `bool` is defined as `_Bool`. | ||
|
||
Flags | ||
----- | ||
:-i, --ignorecase: The values are case insensitive. | ||
|
||
:-p: Writes the enums to standard output. If *typename* is omitted | ||
then all `enum`s are written. | ||
|
||
Exit Status | ||
----------- | ||
0 Successful completion. | ||
|
||
>0 An error occurred. | ||
|
||
See Also | ||
-------- | ||
`typeset`\(1). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,7 @@ Welcome to the Korn Shell | |
continue | ||
disown | ||
echo | ||
enum | ||
fg | ||
source | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters