[WIP] Add support for special commands in favorite queries.
Description
This makes it so your favorite queries can use special commands. For example, you might have a regular export or command you run that should use a particular table format.
\T csv; \once /path/to/export/file.csv; select * from tables limit 5; \T ascii;
Or
\T tsv; pager vim -; select 1, 2, 3; \T ascii; pager less;
NOTE: There is still some weird behavior here with the headers and status of the results being outputted more than once.
- [ ] Fix issue where some query headers are outputted twice.
- [ ] Add tests.
Checklist
- [ ] I've added this contribution to the
changelog.md. - [x] I've added my name to the
AUTHORSfile (or it's already there).
Codecov Report
Merging #600 into master will increase coverage by
0.01%. The diff coverage is87.5%.
@@ Coverage Diff @@
## master #600 +/- ##
==========================================
+ Coverage 77.88% 77.89% +0.01%
==========================================
Files 25 25
Lines 2401 2407 +6
==========================================
+ Hits 1870 1875 +5
- Misses 531 532 +1
| Impacted Files | Coverage Δ | |
|---|---|---|
| mycli/packages/special/iocommands.py | 88.8% <87.5%> (-0.13%) |
:arrow_down: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 4390e38...1d90b81. Read the comment docs.