Skip to content
프로젝트

chitoku-k/fzf-zsh-completions

GitHub에서 보기

소개

Fuzzy completions for fzf and Zsh (git, kubectl, docker, ...)

시스템 및 인프라

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

fzf-zsh-completions

Fuzzy completions for fzf and Zsh that can be triggered by the trigger sequence that defaults to **.

git
kubectl
systemctl

Prerequisites

  • fzf >= 0.21.1
  • Zsh >= 5.1
  • jq >= 1.5
  • awk

The following dependencies are optional unless those completions are desired:

  • docker CLI >= 17.03.0 (for docker completions)
  • git >= 2.7.1 (for git completions)

Installation

Load fzf-zsh-completions.plugin.zsh.

For those who prefer to install via package managers, see the instructions below. Be sure to load the plugin after alias calls for aliased completions to work.

Antigen

antigen bundle "chitoku-k/fzf-zsh-completions"

zplug

zplug "chitoku-k/fzf-zsh-completions"

Usage

For further information, please refer to Fuzzy completions for bash and zsh.

git rebase -i **<TAB>

Supported commands

  • cf
    • Apps/App instances/Tasks/...
    • Domains/Routes/...
    • Files
    • Marketplace/Service brokers/Service instances/...
    • Orgs/Spaces/...
  • composer
    • Scripts
  • docker
    • Containers/Images/Networks/Volumes
    • Files
    • Repositories
  • gh
    • Pull Requests
  • git
    • Commit-ish
    • Commit messaees
    • Files
    • Remotes
  • glab
    • Merge Requests
  • kubectl
    • Annotations/Labels/Field selectors
    • Containers/Ports
    • Files
    • Resources
    • Taints
  • make
    • Targets
  • npm
    • Scripts
  • systemctl
    • Services
  • vault
    • Paths
  • yarn
    • Scripts

Extension

In order to add/override completions for subcommands to the existing completion, define a function as in the following:

# This function implements `kubectl view-serviceaccount-kubeconfig **`
# Function name must be _fzf_complete_(command)_(subcommand)
_fzf_complete_kubectl_view-serviceaccount-kubeconfig() {
    # Call preprocessors
    _fzf_complete_kubectl_parse_resource_and_name 2
    _fzf_complete_kubectl_parse_completing_option
    _fzf_complete_kubectl_parse_kubectl_arguments

    # Return status code other than 0 to fall back to default
    if [[ -n $completing_option ]]; then
        return 1
    fi

    # Call any one of completion functions; see source code as to their usage
    resource=serviceaccounts
    _fzf_complete_kubectl-resource-names '' "$@"
}

Testing

For contributing to this project, be sure to update tests/ and run following:

tests/test.zsh

Related Project

관련 프로젝트 살펴보기

불러오는 중…