| 1 | # User test config file for t-argparse |
| 2 | |
| 3 | [-echo begin of user config (user=${user})] |
| 4 | [+verbose] |
| 5 | # Options applied to all user's config files |
| 6 | echo |
| 7 | |
| 8 | # The next should be flagged as unexpected meta command. |
| 9 | #<off>[ignore] |
| 10 | |
| 11 | # The command mode enables git style commands. As usual it can be |
| 12 | # prefixed with a + to enable or a with a - to disable this feature. |
| 13 | # The last seen in any config file is used. |
| 14 | #<off>[command-mode] |
| 15 | |
| 16 | my-option 4711 |
| 17 | |
| 18 | not-my-option |
| 19 | |
| 20 | verbose |
| 21 | |
| 22 | [let user ${_}Montgomery Scott$_$_ ] |
| 23 | [-echo The name of the user is: "$user". ] |
| 24 | [getenv foo FOO] |
| 25 | [if $_verbose] |
| 26 | [-echo foo=$foo] |
| 27 | [fi] |
| 28 | [getenv home HOME] |
| 29 | [getenv path PATH ] |
| 30 | [if $_verbose] |
| 31 | [-echo home=$home path=$path] |
| 32 | [fi] |
| 33 | |
| 34 | [-info checking user] |
| 35 | [if $user = Scottie's engines ] |
| 36 | [fi] |
| 37 | [-info checking substring check] |
| 38 | [getenv home $HOME] |
| 39 | [if $home =~ home ] |
| 40 | [-echo in home condition] |
| 41 | [fi] |
| 42 | [expand] |
| 43 | [if $foo -n ] |
| 44 | cross-ref "$home/project/$user.crf" |
| 45 | [-echo FOO is set] |
| 46 | [if $home -n] |
| 47 | [-echo home is set] |
| 48 | [else] |
| 49 | [-echo home is not set] |
| 50 | [fi] |
| 51 | [else] |
| 52 | [-echo FOO is not set] |
| 53 | [fi] |
| 54 | street Mühlenstraße |
| 55 | |
| 56 | [getreg x hkcu\fhghfkhkfh] |
| 57 | [if $_windows] |
| 58 | [if $x] |
| 59 | street $x |
| 60 | [fi] |
| 61 | [fi] |
| 62 | |
| 63 | # Print some infos from our strusage function |
| 64 | [-echo strusage(9)=${_strusage9}] |
| 65 | [-echo strusage(11)=${_strusage11}] |
| 66 | [-echo strusage(13)=${_strusage13}] |
| 67 | [-echo pgm="$_pgm" ver="$_version"] |
| 68 | [if $_version -v3gt 6.42.16] |
| 69 | [-echo is > 6.42.16] |
| 70 | [fi] |
| 71 | [if $_version -v3ge 6.42.17] |
| 72 | [-echo is >= 6.42.17] |
| 73 | [fi] |
| 74 | [if $_version -v3lt 6.42.17] |
| 75 | [else] |
| 76 | [-echo is not < 6.42.17] |
| 77 | [fi] |
| 78 | [-echo end of user config] |