タグ

completionに関するbeth321のブックマーク (1)

  • zshでサブコマンドとファイル名を手抜き補完する - Glide Note

    hoge[tab]でサブコマンドが補完され、 サブコマンドの後はファイル、ディレクトリが補完されるように。 サブコマンドとファイル名を補完する 下記を.zshrcに記載してexec $SHELL やっていることは compdefで_hogecmdという補完用functionを定義し、hogeコマンドを実行したときに呼び出されるように。 function内のcmdsで補完したいサブコマンドを列挙 CURRENT == 2でhogeのあとに補完されるのはサブコマンドだけと指定 _describeで補完候補で表示されるときにsubcommandというグループになるようにしている サブコマンドのあとは_filesでファイルとディレクトリが補完されるように 参考になるサイト zshの補完関数の書き方がまとまっているところがほとんど無いので下記が非常参考になります。 zsh補完関数を自作すると便利 -

  • 1
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy