Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ add --completions <shell> arg to generate completions #401

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ttytm
Copy link
Owner

@ttytm ttytm commented Dec 19, 2024

Allows to generate shell completions to simplify usage:

E.g. while typing:

wthrr -

Screenshot_20241219_221716

wthrr -f

Screenshot_20241219_221808

  • update docs

Copy link

Filename                              Stmts    Miss  Cover    Missing
----------------------------------  -------  ------  -------  ------------------------------------------------------------------------------------------------------------
src/main.rs                              16      16  0.00%    19-39
src/modules/api.rs                       24      13  45.83%   26-29, 38, 49-88
src/modules/args.rs                       4       4  0.00%    97-101
src/modules/config.rs                    29      23  20.69%   51-92
src/modules/forecast.rs                  18       4  77.78%   20-21, 23-24
src/modules/localization.rs             106      43  59.43%   162-206, 216, 233-269
src/modules/location.rs                  53      27  49.06%   25-29, 59-63, 75, 95-104, 109, 118-126, 131-132, 142-143
src/modules/params.rs                    52      52  0.00%    25-139
src/modules/units.rs                     13       0  100.00%
src/modules/weather.rs                   28      28  0.00%    83-154
src/modules/display/border.rs            47      18  61.70%   20-22, 26-27, 31-33, 37-38, 42-44, 48-50, 105-106
src/modules/display/current.rs           46       6  86.96%   34, 38, 84, 97, 126-127
src/modules/display/day.rs               42       7  83.33%   29, 33, 58, 61, 67, 92-93
src/modules/display/graph.rs            169      61  63.91%   87-126, 142, 149, 156, 161, 177, 183-187, 197, 211, 218, 225, 230, 246, 275-284, 295-317, 334, 343, 365, 370
src/modules/display/gui_config.rs        15       3  80.00%   48, 54, 60
src/modules/display/historical.rs        44      44  0.00%    23-153
src/modules/display/hourly.rs           163      97  40.49%   48-67, 71-80, 89-92, 99, 141, 145-146, 229, 250, 269-279, 323-457
src/modules/display/product.rs           26      26  0.00%    26-76
src/modules/display/utils.rs             35       6  82.86%   14-17, 23, 54-55
src/modules/display/weathercode.rs       31      23  25.81%   13, 17-23, 26-32, 34-41
src/modules/display/week.rs              45       3  93.33%   36, 105-106
src/modules/display/wind.rs              21      11  47.62%   24-27, 35-38, 40-42
TOTAL                                  1027     515  49.85%

Copy link

Test Results

13 tests  ±0   13 ✅ ±0   1s ⏱️ ±0s
 1 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit 76378bf. ± Comparison against base commit f9ce06e.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant