开发者

zsh auto completion in home dir

开发者 https://www.devze.com 2023-04-02 01:01 出处:网络
I used for years in openSuSE the: #compdef w _files -W ~/work -/ function to auto-complete the directory names in my ~/work dir.

I used for years in openSuSE the:

#compdef w
 _files -W ~/work -/

function to auto-complete the directory names in my ~/work dir.

It does not work in Ubuntu zsh -v 4.3.11, when I hit TAB after w I got dire开发者_运维知识库ctories from my home directory.

What's different in Ubuntu?


Nevermind I found cdpath variable. I added in my config file

cdpath=( /usr ~ ~/work )

and it works :) Just cd somechar Tab. No more compdef functions.

0

精彩评论

暂无评论...
验证码 换一张
取 消