<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>int128</author_name>
  <author_url>https://blog.hatena.ne.jp/int128/</author_url>
  <blog_title>GeekFactory</blog_title>
  <blog_url>https://int128.hatenablog.com/</blog_url>
  <categories>
    <anon>zsh</anon>
    <anon>Kubernetes</anon>
  </categories>
  <description>kubectl にはシェルの補完機能が用意されています。 .zshrc で補完機能を有効化するとzshの起動に時間がかかるため、補完機能の有効化を遅延実行するようにしてみました。 具体的には、 kubectl コマンドの初回実行時のみ source &lt;(kubectl completion zsh) を実行します。 function kubectl () { local kubectl=&quot;$(whence -p kubectl 2&gt; /dev/null)&quot; [ -z &quot;$_lazy_kubectl_completion&quot; ] &amp;&amp; { echo &quot;\e[31m$0 completion zsh…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fint128.hatenablog.com%2Fentry%2F2018%2F01%2F02%2F152412&quot; title=&quot;kubectl completionの遅延実行によるzshの起動時間短縮 - GeekFactory&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://images-fe.ssl-images-amazon.com/images/I/41HRQrBzfOL._SL160_.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2018-01-02 15:24:12</published>
  <title>kubectl completionの遅延実行によるzshの起動時間短縮</title>
  <type>rich</type>
  <url>https://int128.hatenablog.com/entry/2018/01/02/152412</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
