joerdav / xc

Markdown defined task runner.
https://xcfile.dev/
MIT License
1.17k stars 27 forks source link

:pray: feature request > auto complete #71

Closed adriens closed 1 year ago

adriens commented 1 year ago

it would be awesome so, like in make to be able to autocomplete (TAB) xc targets :pray:

joerdav commented 1 year ago

Hi @adriens thanks for checking out xc.

xc does in fact support automcomplete. However, you did bring to my attention I needed to upgrade it and it's documentation!

joerdav commented 1 year ago

Released in v0.2.0 plus docs are at https://xcfile.dev/getting-started/#install-completion

adriens commented 1 year ago

i'm giving it a test :zap:

adriens commented 1 year ago

The autocomplete continues to list me the files of the current dir :point_down:

 xc -V
xc version: 0.2.0
 xc -complete
~/Github/odata-eaux-baignade-noumea    main  xc                                                                                                                                                                   08:05:30  
data/      README.md

Still this works :

 xc
    latest   Print the latest status of all beaches
    last-20  Print the 20 last status of all beaches

 xc latest
+ sh /tmp/sh-interp-6edf2c088f4c1fc1 +duckdb.org duckdb
+ curl https://tea.xyz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 13734  100 13734    0     0  10364      0  0:00:01  0:00:01 --:--:-- 10365

┌──────────────────────────────────────┬────────────┬────────────┐
│                plage                 │ flag_color │ flag_color │
│               varchar                │  varchar   │  varchar   │
├──────────────────────────────────────┼────────────┼────────────┤
│ Plage de la promenade Pierre-Vernier │ BLUE       │ 🟦         │
│ Plage de l'Anse-Vata                 │ BLUE       │ 🟦         │
│ Plage de Magenta                     │ BLUE       │ 🟦         │
│ Plage du Kuendu Beach                │ BLUE       │ 🟦         │
│ Plage de la baie des Citrons         │ BLUE       │ 🟦         │
└──────────────────────────────────────┴────────────┴────────────┘
~/Github/odata-eaux-baignade-noumea    main 

:information_source: I'm running on zsh (OMZ)

joerdav commented 1 year ago

@adriens I believe you might be missunderstanding the commands.

xc -complete will install xc auto completion to zsh.

You should be running the commands as ( is where you press the tab key):

❯ xc -V
xc version: 0.2.0
❯ xc -complete
❯ xc <tab>
latest      last-20

You only have to install completion once, then you won't have to run it again.

adriens commented 1 year ago

:ok_hand:

image