Skip to content

Commit 99a7d49

Browse files
committed
docs: README and docs/README update
1 parent 7c4bb04 commit 99a7d49

2 files changed

Lines changed: 68 additions & 0 deletions

File tree

README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,40 @@ gitstart -d . -l javascript --description "My existing JavaScript project"
148148
gitstart version
149149
```
150150

151+
### Shell Completion
152+
153+
Gitstart supports Tab completion in your shell. Once set up, pressing Tab after typing part of a flag or subcommand will either complete it automatically or show you the available options. For example:
154+
155+
```sh
156+
gitstart --di[TAB] # completes to --directory
157+
gitstart --[TAB] # lists all flags
158+
gitstart [TAB] # lists all subcommands: completion, help, version
159+
```
160+
161+
Run the setup command for your shell once, then open a new terminal (or source your config file):
162+
163+
**Bash**
164+
```sh
165+
gitstart completion bash >> ~/.bashrc
166+
source ~/.bashrc
167+
```
168+
169+
**Zsh**
170+
```sh
171+
gitstart completion zsh > "${fpath[1]}/_gitstart"
172+
source ~/.zshrc
173+
```
174+
175+
**Fish**
176+
```sh
177+
gitstart completion fish > ~/.config/fish/completions/gitstart.fish
178+
```
179+
180+
**PowerShell**
181+
```sh
182+
gitstart completion powershell >> $PROFILE
183+
```
184+
151185
### Working with Existing Directories
152186

153187
**Empty directory:** Creates repository normally

docs/README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,40 @@ gitstart -d . -l javascript --description "My existing JavaScript project"
148148
gitstart version
149149
```
150150

151+
### Shell Completion
152+
153+
Gitstart supports Tab completion in your shell. Once set up, pressing Tab after typing part of a flag or subcommand will either complete it automatically or show you the available options. For example:
154+
155+
```sh
156+
gitstart --di[TAB] # completes to --directory
157+
gitstart --[TAB] # lists all flags
158+
gitstart [TAB] # lists all subcommands: completion, help, version
159+
```
160+
161+
Run the setup command for your shell once, then open a new terminal (or source your config file):
162+
163+
**Bash**
164+
```sh
165+
gitstart completion bash >> ~/.bashrc
166+
source ~/.bashrc
167+
```
168+
169+
**Zsh**
170+
```sh
171+
gitstart completion zsh > "${fpath[1]}/_gitstart"
172+
source ~/.zshrc
173+
```
174+
175+
**Fish**
176+
```sh
177+
gitstart completion fish > ~/.config/fish/completions/gitstart.fish
178+
```
179+
180+
**PowerShell**
181+
```sh
182+
gitstart completion powershell >> $PROFILE
183+
```
184+
151185
### Working with Existing Directories
152186

153187
**Empty directory:** Creates repository normally

0 commit comments

Comments
 (0)