Skip to content

Commit

Permalink
fix: remove deprecated completion
Browse files Browse the repository at this point in the history
  • Loading branch information
Antoine Gelloz committed Oct 30, 2024
1 parent bc172b1 commit 30ec314
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 96 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
name: Publish docs
on: # yamllint disable-line rule:truthy
workflow_dispatch:
on:

Check warning on line 3 in .github/workflows/docs.yml

View workflow job for this annotation

GitHub Actions / lintyaml

3:1 [truthy] truthy value should be one of [false, true]
pull_request:
types: [opened, synchronize]
paths:
- "cmd/docgen.go"
- "**.md"
push:
branches: ['docs*']
tags: ['v*']

permissions:
contents: read
branches: [main]

jobs:
publish-docs:
Expand Down
84 changes: 0 additions & 84 deletions docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,87 +12,3 @@ Installation Guide
=== "From binary"

Binaries are available to download from the [GitHub releases](https://github.com/radiofrance/dib/releases) page.

## Shell autocompletion

Configure your shell to load dib completions:

=== "Bash"

To load completion run:

```shell
. <(dib completion bash)
```

To configure your bash shell to load completions for each session add to your bashrc:

```shell
# ~/.bashrc or ~/.bash_profile
command -v dib >/dev/null && . <(dib completion bash)
```

If you have an alias for dib, you can extend shell completion to work with that alias:

```shell
# ~/.bashrc or ~/.bash_profile
alias tm=dib
complete -F __start_dib tm
```

=== "Fish"

To configure your fish shell to [load completions](http://fishshell.com/docs/current/index.html#completion-own)
for each session write this script to your completions dir:

```shell
dib completion fish > ~/.config/fish/completions/dib.fish
```

=== "Powershell"

To load completion run:

```shell
. <(dib completion powershell)
```

To configure your powershell shell to load completions for each session add to your powershell profile:

Windows:

```shell
cd "$env:USERPROFILE\Documents\WindowsPowerShell\Modules"
dib completion >> dib-completion.ps1
```
Linux:

```shell
cd "${XDG_CONFIG_HOME:-"$HOME/.config/"}/powershell/modules"
dib completion >> dib-completions.ps1
```

=== "Zsh"

To load completion run:

```shell
. <(dib completion zsh) && compdef _dib dib
```

To configure your zsh shell to load completions for each session add to your zshrc:

```shell
# ~/.zshrc or ~/.profile
command -v dib >/dev/null && . <(dib completion zsh) && compdef _dib dib
```

or write a cached file in one of the completion directories in your ${fpath}:

```shell
echo "${fpath// /\n}" | grep -i completion
dib completion zsh > _dib

mv _dib ~/.oh-my-zsh/completions # oh-my-zsh
mv _dib ~/.zprezto/modules/completion/external/src/ # zprezto
```
5 changes: 0 additions & 5 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,6 @@ nav:
- Build: cmd/dib_build.md
- List: cmd/dib_list.md
- Version: cmd/dib_version.md
- Completion:
- Bash: cmd/dib_completion_bash.md
- Fish: cmd/dib_completion_fish.md
- Powershell: cmd/dib_completion_powershell.md
- ZSH: cmd/dib_completion_zsh.md
- Development:
- Documentation: documentation.md
- Roadmap: roadmap.md

0 comments on commit 30ec314

Please sign in to comment.