> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cloud.vessl.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# vesslctl completion

> vesslctl 명령어와 플래그에 셸 탭 자동완성을 켜는 방법을 알아봐요.

`vesslctl`은 bash, zsh, fish, PowerShell용 자동완성 스크립트를 함께 배포해요. 가장 빠른 방법은 `vesslctl completion install`이 셸을 자동 감지해서 표준 위치에 스크립트를 설치하도록 두는 거예요.

## completion install

`$SHELL`에서 현재 셸을 감지해 적절한 경로에 자동완성 스크립트를 써요. 멱등성이 보장되니까 `vesslctl`을 업그레이드한 뒤에 다시 실행해도 안전해요.

```bash theme={null}
vesslctl completion install
```

지원 셸: bash, zsh, fish. PowerShell은 아래 수동 설정을 사용해 주세요.

**기본 설치 경로:**

| 셸    | 경로                                                    |
| ---- | ----------------------------------------------------- |
| bash | `~/.local/share/bash-completion/completions/vesslctl` |
| zsh  | `~/.zsh/completions/_vesslctl`                        |
| fish | `~/.config/fish/completions/vesslctl.fish`            |

설치 후에는 새 터미널을 열거나, 쓰는 셸의 설정 파일을 다시 불러와 주세요(예: `source ~/.zshrc`, `source ~/.bashrc`). zsh를 쓴다면 `~/.zshrc`에 자동완성 디렉터리가 등록돼 있지 않을 때 인스톨러가 추가할 코드를 안내해 줘요:

```bash theme={null}
fpath=(~/.zsh/completions $fpath)
autoload -U compinit; compinit
```

## completion bash | zsh | fish | powershell

요청한 셸의 자동완성 스크립트를 stdout으로 출력해요. 스크립트 위치를 직접 관리하고 싶을 때 사용해요.

```bash theme={null}
vesslctl completion bash
vesslctl completion zsh
vesslctl completion fish
vesslctl completion powershell
```

**수동 설정 예시:**

<CodeGroup>
  ```bash Bash (Linux) theme={null}
  vesslctl completion bash > /etc/bash_completion.d/vesslctl
  ```

  ```bash Bash (macOS, Homebrew) theme={null}
  vesslctl completion bash > $(brew --prefix)/etc/bash_completion.d/vesslctl
  ```

  ```bash Zsh theme={null}
  vesslctl completion zsh > "${fpath[1]}/_vesslctl"
  ```

  ```bash Fish theme={null}
  vesslctl completion fish > ~/.config/fish/completions/vesslctl.fish
  ```

  ```powershell PowerShell theme={null}
  vesslctl completion powershell > vesslctl.ps1
  # 그런 다음 PowerShell 프로필에서 점(`.`) 명령으로 불러와 주세요(예: . .\vesslctl.ps1).
  ```
</CodeGroup>

<Tip>
  인자와 플래그 값에도 자동완성이 적용돼요. 활성화한 후에는 `--cluster`, `--resource-spec`, `--org` 같은 플래그나 Workspace/Job slug 자리에서 **Tab**을 누르면 현재 조직과 팀의 실제 값이 후보로 떠요.
</Tip>
