3 ms·
Shell plugin I wrote writes your Git commands
This shell plugin I wrote turns out to be really good at writing git commands.
The git commands below are AI generated from the comments.
```
printcon-ml git:(master) # show the date the file fastai_main.py was first added to the repo
git log --diff-filter=A --follow --format="%ad" --date=short -- fastai_main.py
printcon-ml git:(master) # show the commit before the 2021-12-04
git log --before=2021-12-04
printcon-ml git:(develop) # show all git branches and their creation dates
git for-each-ref --sort=-committerdate --format='%(refname:short), %(committerdate:short)' refs/heads/
develop, 2022-04-28
multiprocessing_manager, 2022-04-28
master, 2022-01-11
plotting_upgrade, 2022-01-04
image_samples, 2022-01-03
label_output, 2021-10-12
percentages_output, 2021-08-10
add_model_argument, 2021-08-10
model_9, 2021-08-05
model_7, 2021-08-05
```
[Zsh version](https://github.com/tom-doerr/zsh_codex)
[Fish version](https://github.com/tom-doerr/codex.fish)
Any ideas for other difficult command line tasks that might profit from AI?
- WalterGR 5y agoIt's really hard to read your post. On HN, for code, put two spaces at the beginning of the line. ``` doesn't do anything.
- gus_massa 5y ago``` does not work here. Add some double enters until the site formats the text properly. To parse the comments, are you using something similar to an expert system or a library?
- tom_doerr 5y agoI'm using OpenAI Codex to create the commands
- gus_massa 5y agoIt's too late to edit, so I'll rewrite it here for you --------------------------- Example 1: > printcon-ml git:(master) # show the date the file fastai_main.py was first added to the repo ====> > git log --diff-filter=A --follow --format="%ad" --date=short -- fastai_main.py --------------------------- Example 2: > printcon-ml git:(master) # show the commit before the 2021-12-04 ====> > git log --before=2021-12-04 --------------------------- Example 3: > printcon-ml git:(develop) # show all git branches and their creation dates ====> > git for-each-ref --sort=-committerdate --format='%(refname:short), %(committerdate:short)' refs/heads/ develop, 2022-04-28 multiprocessing_manager, 2022-04-28 master, 2022-01-11 plotting_upgrade, 2022-01-04 image_samples, 2022-01-03 label_output, 2021-10-12 percentages_output, 2021-08-10 add_model_argument, 2021-08-10 model_9, 2021-08-05 model_7, 2021-08-05*
- tom_doerr 5y agothanks!