{"categories":[],"type":"rich","title":"root \u3067 zsh","provider_name":"Hatena Blog","image_url":null,"blog_title":"shag \u306e\u65e5\u8a18","blog_url":"https://shag.hatenadiary.org/","height":"190","author_name":"shag","provider_url":"https://hatena.blog","url":"https://shag.hatenadiary.org/entry/20060316","width":"100%","author_url":"https://blog.hatena.ne.jp/shag/","version":"1.0","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fshag.hatenadiary.org%2Fentry%2F20060316\" title=\"root \u3067 zsh - shag \u306e\u65e5\u8a18\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","description":"root \u3067 zsh \u4f7f\u3046\u3068 command completion \u304c\u306a\u305c\u304b\u5931\u6557\u3057\u3066 portupgrade \u3067 package \u540d\u3092\u88dc\u5b8c\u3067\u304d\u306a\u3044\u306e\u3067\u3001\u81ea\u5206\u3067 /var/db/pkg \u3092\u53c2\u7167\u3057\u3066\u88dc\u5b8c\u30ea\u30b9\u30c8\u306b\u7a81\u3063\u8fbc\u3080\u3088\u3046\u306b\u3057\u3066\u307f\u305f\u3002(\u3069\u3046\u3082\u51fa\u6765\u308b\u30de\u30b7\u30f3\u3068\u51fa\u6765\u306a\u3044\u30de\u30b7\u30f3\u304c\u3042\u308b\uff1f)/root/.zshrc \u306b\u3053\u3093\u306a\u884c\u3092\u66f8\u304d\u3001 compdef -d portupgrade pkg_list=(`perl /root/listpkg.pl`) compctl -k pkg_list portupgrade/root/listpkg.pl \u3092\u66f8\u304f\u3002 #!/usr/local/bin/perl use Fi\u2026","published":"2006-03-16 00:00:00"}