You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
The official documentation for writing zsh completion functions is difficult to understand, and doesnât give many examples. At the time of writing this document I was able to find a few other tutorials on the web, however those tutorials only explain a small portion of the capabilities of the completion system. This document aims to cover areas not explained elsewhere, with examples, so that you c
by John Beppu translated into japanese by Jun Mukai ãã®ã³ã©ã ãèªãã§æ°ã¶æãããªããã¡ã«ãããªã㯠zsh ã®éæ¹ããªãã¿ãè£å®ã·ã¹ãã ã«ã¤ãã¦å¦ãã§ããã ãããèªåã® $HOME/.zshrc ãã¡ã¤ã«ã«æ¬¡ã®2è¡ã足ãã ãã§ãã¿ããã¼ã§ãã¡ã¤ã«åãæ¾ãã ãã§ãªãã¦ãã³ãã³ãã©ã¤ã³ãªãã·ã§ã³ãæã£ã¦ãããã¨ãã§ããã autoload -U compinit compinit ãã Linux ã³ãã³ãã«å¯¾ããã³ãã³ãã©ã¤ã³ãªãã·ã§ã³ã®ãªã¹ããæä¾ããããã«ã zsh ã¯ãã®ã³ãã³ãã«å¯¾å¿ããè£å®é¢æ°ãå®è¡ãã(ã¤ã¾ãã ls ã¨ã¿ã¤ããã¦ã¿ããã¼ãæ¼ãããã zsh 㯠ls ã®è£å®é¢æ°ãå®è¡ããã®ã )ãåã ã®è£å®é¢æ°ã¯ã³ãã³ãã®ãªãã·ã§ã³ããªã¹ãã¢ããããã©ã®ãªãã·ã§ã³ãå¼æ°ãè¦æ±ãããæ示ãã¦ããããè£å®é¢æ°ã¯ã³ã³ããã¹ãä¾åã«
jsxã®è£å®ãæ¸ãããã£ãã¨ããããã³ã³ãã§åºåãããå¤ã®è£å®ã ã©ããããã ã¨ããã®ãç¥ãããã£ãã®ã§æ¸ãã¦ã¿ã¾ããã ã³ã¼ã jsx --helpã ããåèã«æ¸ããã®ã§åé¡ãããããããã¾ããã #compdef jsx _jsx_warn() { local expl warning local -a jsx_warnings jsx_warnings=(all deprecated none) # Ignore existing values compset -P '*,' # Remove already-referenced warnings for warning in ${(s:,:)${IPREFIX}} do jsx_warnings=( ${jsx_warnings:#$warning} ) done _wanted jsx_warnings expl 'warnin
# è£å®ãæå¹ã«ãã autoload -U compinit compinit -u # è£å®ã¡ãã»ã¼ã¸ãèªã¿ããããã zstyle ':completion:*' verbose yes zstyle ':completion:*' format '%B%d%b' zstyle ':completion:*:warnings' format 'No matches for: %d' zstyle ':completion:*' group-name '' è£å®é¢æ°ã®ã«ã¼ã« $fpath ã®éã£ããã£ã¬ã¯ããªã«è£å®é¢æ°ãç½®ã nyan ã³ãã³ãã®è£å®é¢æ°ãªã _nyan ã¨ããååã§ä¿åãã è£å®é¢æ°ã®å é ã«ã¯ #compdef nyan ã¨è£å®å¯¾è±¡ã®ã³ãã³ãåãæ¸ã ãã¡ã¤ã«åã¨åãååã®é¢æ°ãä½ããã®ä¸ã«è£å®é¢æ°ãæ¸ã ~/zsh/functions/_nyan
When I switched from bash(1) to zsh(1), I was surprised to find how many standard programs lacked completion functions. Only few of the coreutils are supported in vanilla zsh(1). Although there are user-contributed repositories like zsh-users/zsh-completions I still couldn't find completion functions for tools like cat, nl, df and others. So I wrote some and I've found that I basically just copied
åãã« ghq ã¨ããã³ãã³ãããããGitHub ã®ãªãã¸ããªãã¯ãã¼ã³ãã¦ããæãã«ç®¡çããã³ãã³ãã ã ããã«ã¯ zsh è£å®ãã¡ã¤ã«ãå«ã¾ãã¦ãããã ãã©ãè£å®ã§ããªããªãã·ã§ã³ãã£ãããã¦ããã¾ãã¡ã ã£ãããªã®ã§ãããç´ããã¨ã«ããã ä½æ¥ãåã«ä¿®æ£ã㦠Pull Request ãéã£ããç¡äºåãè¾¼ã¾ããã®ã§ãã©ãããæãã§ä¿®æ£ããã®ãããã®éç¨ãç´¹ä»ãã¦ã¿ããè£å®é¢æ°ã®æ¸ãæ¹ãåãããªã人ã§ãé°å²æ°ã¯ä¼ããã¨æãã®ã§åèã«ãã¦ã¿ã¦ã»ããã ã¡ãªã¿ã«ãghq èªä½ã®è©³ãã使ãæ¹ã¯ä½ã£ã人ã®ç´¹ä»è¨äºãè¦ãã®ãè¯ãã¨æãã ã©ããç´ãã ã¾ããghq ã³ãã³ãã®åºæ¬çãªä½¿ãæ¹ã¯ãããªæãã # GitHub ã® mollifier/config ãªãã¸ããªããã¼ã«ã«ã« clone ãã % ghq get mollifier/config # clone ãããªãã¸ããªãä¸è¦§è¡¨ç¤ºã
ååã¯daemonã³ãã³ãã«å¯¾ããè£å®æ©è½ãè¨å®ããæ¹æ³ã«ã¤ãã¦è¿°ã¹ããä»åã¯ããã«è£å®æ©è½ãé«ããæ¹æ³ã«ã¤ãã¦è§£èª¬ãããã å¼æ°ã®ã³ãã³ãã«å¯¾ãã¦ããããè£å®ãå¹ãããã«ãã daemonã³ãã³ãã¯å¼æ°ã«ã³ãã³ããã¨ãããã®ãããã³ãã³ããè£å®å¯¾è±¡ã¨ã§ãããã«è¨å®ããããã ããããã ãã§ã¯ä½¿ãã«ãããã³ãã³ããè£å®è¡¨ç¤ºãããã¨ã¯ããã®ã³ãã³ãã®è£å®è¨å®ãæ©è½ããããã«ãããã¨ããã ã ããã§ãã³ãã³ãè£å®ã®å¾ã«ã'*::args:_normal'ãã追å ããããããã¯ãå¼æ°ã®ã³ãã³ãã«å¯¾ãã¦è£å®ãæå¹ã«ãªãè¨å®ã ãæå®ããé çªããã®ã¾ã¾ã³ãã³ãè£å®ã®è£å®å ´æã«å¯¾å¿ãã¦ããã ãªã¹ã1.1 è£å®ããã¦è¡¨ç¤ºãããã³ãã³ãã«å¯¾ãã¦è£å®è¨å®ãæå¹ã«ãªãããã«è¨å®ã追å #compdef daemon _arguments \ ':command:_command_names -e' \ '*::
X-seq: zsh-workers 19880 From: joey@xxxxxxxxxx To: zsh-workers@xxxxxxxxxx, schizo@xxxxxxxxxx, ian@xxxxxxxxxxx Subject: use tab-completion rules extracted from man page Date: Wed, 5 May 2004 03:42:26 +0100 Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm Reply-to: Paul Joey Clark <pclark@xxxxxxxxxxxxx> Greetings elite shell hackers! I wrote this script to extract all the - and -- opt
ã¸ã«ããªãã·ã§ã³ `--help` ãåãä»ããã³ãã³ãã®ãªãã·ã§ã³è£å®ãããç¨åº¦èªåçã«ãã¦ããã `_gnu_generic` é¢æ°ã®ä½¿ãæ¹ã§ããZsh ã ./configure ã®è£å®ã¯å¿ è¦ãªæã«ãå±éºãæ¿ç¥ã§ ./configure --help ãå®è¡ãã¦è£å®åè£ãä½ã£ã¦ãããã¨èãããã¨ãããã¨æãã¾ãã _gnu_generic ã¨ããã®ã¯ããã¨ä¼¼ããããªæ©è½ãæä¾ãã¦ãããè£å®ã·ã¹ãã ã®ã¦ã¼ãã£ãªãã£é¢æ°ã§ããªãã·ã§ã³ã®è£å®ã« $command --help ãå®è¡ãã¦ãã®çµæããè£å®åè£ãä½ã£ã¦ããã¾ãã ä¾ãã°ãã³ãã³ã emacsclient ã®è£å®ã¯zshã«ã¯ç¨æããã¦ãããããªãã·ã§ã³ã®è£å®ã¯ããã¾ããããã㧠_gnu_generic ã使ãã¾ãã ;# emacs çããªãã·ã§ã³ã®è£å®ãç¡ãã®ã§ããã§ä¸æã«æå®ãã¦ãã¾ãã¾ã % compdef _gnu_g
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}