🔥 쉘 완성 스크립트 생성하기

66자
1분

명령줄 도구에 --generate-completion-script 옵션을 전달하면 해당 쉘용 완성 스크립트가 생성됩니다. 예를 들어 Bash 쉘용 완성 스크립트를 생성하려면 다음 명령을 실행합니다.

text
$ example --generate-completion-script bash
#compdef example
local context state state_descr line
_example_commandname="example"
typeset -A opt_args


_example() {
    integer ret=1
    local -a args
    ...
}


_example
text
$ example --generate-completion-script bash
#compdef example
local context state state_descr line
_example_commandname="example"
typeset -A opt_args


_example() {
    integer ret=1
    local -a args
    ...
}


_example

위 명령을 실행하면 Bash용 완성 스크립트가 출력됩니다. Z 쉘이나 Fish 쉘용 완성 스크립트도 마찬가지로 생성할 수 있습니다.

YouTube 영상

채널 보기
AI에서 선형대수학이 중요한 이유
AI에서 고차원 임베딩이 무엇일까?
벡터의 정의와 덧셈 연산 | 선형대수학
숫자 하나가 AI 모델의 운명을 바꾼다? | 선형대수학
AI를 위한 선형대수, 데이터는 점구름이다
11편, 왜 DB마다 성능이 다를까? 엔진별 B-Tree 저장 방식 비교
트라이(Trie) 자료구조: 파이썬으로 삽입(Insert) 연산 구현하기 | Trie 자료구조 이야기
BTree 노드의 구조는?