| 1 | stdlib/
|
| 2 | =======
|
| 3 |
|
| 4 | Ideas for shell functions that could be in here:
|
| 5 |
|
| 6 | - Version comparison: https://github.com/oilshell/oil/issues/683
|
| 7 | - An automated way to download the latest version of Oil: https://github.com/oilshell/oil/issues/463
|
| 8 | - Maybe functions to lazily download documentation too?
|
| 9 | - `errexit` utilities: https://github.com/oilshell/oil/issues/474
|
| 10 |
|
| 11 | ## Notes on Contents
|
| 12 |
|
| 13 | This should be in doc/ref/chap-stdlib.md
|
| 14 |
|
| 15 | two.sh # The two functions I actually use
|
| 16 | byo-server-lib.sh # for using bash to test scripts
|
| 17 | # you need a client too
|
| 18 |
|
| 19 | YSH
|
| 20 |
|
| 21 | args.ysh
|
| 22 | testing.ysh # should these be assertions?
|
| 23 |
|
| 24 | stream.ysh
|
| 25 | table.ysh
|
| 26 |
|
| 27 | math.ysh # abs, max, min - TODO: sum
|
| 28 | list.ysh # any all sum
|
| 29 | funcs.ysh # identity - not that useful
|
| 30 |
|
| 31 | prelude.ysh # todo pass, hm
|
| 32 |
|
| 33 | ## Polyfill ideas
|
| 34 |
|
| 35 | ### From Soil - Fix SSH and Bernstein chaining
|
| 36 |
|
| 37 | ssh $USER@$HOST "$(argv-to-str "$@")"
|
| 38 |
|
| 39 | which is simply:
|
| 40 |
|
| 41 | ssh $USER@$HOST "$(printf '%q ' "$@")"
|
| 42 |
|
| 43 | Though it would be more convenient as:
|
| 44 |
|
| 45 | quotefix ssh $USER@$HOST --- "$@"
|
| 46 |
|
| 47 | The --- means you are ending the normal args?
|
| 48 |
|
| 49 |
|
| 50 | Do we also need one for scp? On OS X it seems more weird.
|
| 51 |
|
| 52 | ### exit 255 for xargs?
|
| 53 |
|
| 54 | That's the special exit code to ABORT, hm.
|
| 55 |
|
| 56 | But I think 'each' will not do this? We should concentrate on that.
|
| 57 |
|
| 58 |
|
| 59 | ### strict mode
|
| 60 |
|
| 61 | Not sure it makes sense to source anything for this.
|
| 62 |
|
| 63 | shopt --set strict:all || true 2>&/dev/null
|