1051 Commits (4c46ff3c2b32ee566ddb7cbb7ec1c1b691e19a5f)
 

Author SHA1 Message Date
Sayan Nandan 9b132f4351
Upgrade deps
Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
3 years ago
Sayan Nandan 87b8d91f2c
Support inline comments in `skysh`
Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
3 years ago
Sayan Nandan 01ab66f64c
Support comments in `skysh`
Also support multiline pasting in the interactive shell

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
3 years ago
Sayan Nandan eb22456b18
Fix input of multiline commands in skysh
Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
3 years ago
Sayan Nandan 55fca51815
Disallow text directly before quotes
Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
3 years ago
Sayan Nandan e18205c4d3
Disallow text directly after quote(s)
If we do permit this to happen, it can lead to several errors. For
example, if we ran this:

get rust'ferris'

the tokenizer would have inferred this as ["get", "rust", "ferris"]
which will lead to an action error. This commit prevents that from
happening.

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
3 years ago
Sayan Nandan 7973730de5
Issue errors with single quotes
Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
3 years ago
Sayan Nandan af53eda1f7
Simplify line append op and add changelog entry
Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
3 years ago
Sayan Nandan 58d32c0a96
Add tests for skysh tokenizer
Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
3 years ago
Sayan Nandan fcc99268fb
Support multiline strings in skysh
Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
3 years ago
Sayan Nandan 49d7eecbab
Remove re expressions used for queries in skysh
These are no longer relevant because of the last commit

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
3 years ago
Sayan Nandan 4d4ce95f13
Use manual tokenization for queries in skysh
This avoids all the regex fuss

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
3 years ago
Sayan Nandan 2814bdb151
Bump up version to 0.7.1
Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
3 years ago
Sayan Nandan 0e645569b0
Fix quote inputs to skysh for whitespaced vals
If the matched group has a starting 0x22, only then remove the trailing
quotes. Similarly, if the matched group has a starting 0x27, only then
remove the trailing quote.

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
3 years ago
Sayan Nandan 90276e3ead
Upgrade deps
Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
3 years ago
Sayan Nandan 18a0f557a0
Merge branch 'config/env' into next 3 years ago
Sayan Nandan 374ba57133
Add support for environment variable configuration
Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
3 years ago
Sayan Nandan 2387103c5c
Fix missing check for durations in config
Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
3 years ago
Sayan Nandan 468b1460e4
Fix conflict check tests
Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
3 years ago
Sayan Nandan ef652befc9
Add env var `ConfigError` variant and rename ident
The `ParsedConfig` struct was renamed to `ConfigurationSet` because it
is more clear in contexts as parsing can be an ambiguous term in several
places.

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
3 years ago
Sayan Nandan 29a154f70e
Add tests for configuration conflict
Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
3 years ago
Sayan Nandan f56610123e
Fix check of host and port values in config file
43bef62a incorrectly dismissed the check for host/port config in the
case of a non-TLS setup. This commit fixes that.

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
3 years ago
Sayan Nandan 9a6bf82408
Simplify configuration handling
The previous configuration handling was rather messed up,
which however is something that this commit attempts to
simplify.

The check for configuration conflict was resolved with a far
more feasible approach and the handling of CLI/config file
configuration was also simplified greatly.

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
3 years ago
Sayan Nandan 43bef62a9e
Simplify config generation from cfg file
Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
3 years ago
Sayan Nandan 788b3073c0
Remove unnecessary use of `Box`
Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
3 years ago
Sayan Nandan b5a0e02091
Move config file de into module
This really helps us reduce the grand clutter we created earlier.

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
3 years ago
Sayan 33408cac96
Add subactions for lists to actiondoc (#225)
* Restructure actiondoc to support subactions [skip ci]

* Fix YAML indentation [skip ci]

* Add all `LGET` subactions [skip ci]

* Add `LSET` and `LMOD` subactions [skip ci]

* Fix newlines [skip ci]
3 years ago
Sayan Nandan a43e1183b3 Bump up version 3 years ago
Sayan Nandan eb037fcd62 Add basic `env` config module 3 years ago
Sayan Nandan dff703e843 Don't bench on push [skip ci] 3 years ago
Sayan Nandan 44c6e61c10 Add `UnknownDataType` error handling in `skysh` 3 years ago
Sayan Nandan 4dbcce6e04 Upgrade deps 3 years ago
Sayan Nandan 9f08122759 Fix silent removal of all quotes from input string
The CLI simply replaced all the quotes in the origin string which can
result in unexpected behavior. For example, consider the input string:
SET "all the cars' tyres" 'have holes'
In our last impl, we'd end up replacing all single and double quotes
resulting in the origin string being entirely changed! This commit
fixes this.
3 years ago
Sayan Nandan 6cd3d4d2eb Improve printing of binary strings in shell 3 years ago
Sayan Nandan 9991a97949 Merge branch 'model/lists-lastfirst' into next 3 years ago
Sayan Nandan 05bae45cb0 Add changelog entry [skip ci] 3 years ago
Sayan Nandan f85effc1c0 Fix empty list tests 3 years ago
Sayan Nandan 2ee227a5dc Add `lget last` and `lget first` tests 3 years ago
Sayan Nandan b368db2407 Add methods `FIRST` and `LAST` 3 years ago
Sayan Nandan b9c60b4cc7 Use ptr offsets for accesses to reduce bloat 3 years ago
Sayan Nandan ee78f9b1ce Avoid excessive const inlining
Also removed unnecessary assembly bloat resulting from the generic index
accesses through (unck get)
3 years ago
Sayan Nandan c3d977c703 Simplify `lmod clear` return 3 years ago
Sayan Nandan a41fd7fa7f Fix `lmod` bug resulting in return of wrong rcode 3 years ago
Sayan Nandan c34f241f2e Fix encoding check in list actions 3 years ago
Sayan Nandan c5a58dec3d Fix `is_empty` impl for `AnyArrayIter`
The impl was erroneously checking the base boxed slice for its length
when what we actually needed was the iter len (remainder).
3 years ago
Sayan Nandan e1ee9314f5 Add `is_empty` to `AnyArrayIter` for specificity 3 years ago
Sayan Nandan b34d059cd5 Add `Sync` trait bounds for ease with manual afns 3 years ago
Sayan Nandan f6b3f8dc5c Simplify encoding checks across actions
This commit also removes the forceful `__private` module naming for the
`dbtest` proc macro. Supplied modules can now have any name.
3 years ago
Sayan Nandan c298f55b23 Use primitive casts to reduce jumps 3 years ago
Sayan Nandan f4fbdcae16 Fix encoding check correctness in actions 3 years ago