<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>masasuz</author_name>
  <author_url>https://blog.hatena.ne.jp/masasuz/</author_url>
  <blog_title>目の前に僕らの道がある</blog_title>
  <blog_url>https://blog.masasuzu.net/</blog_url>
  <categories>
    <anon>linux</anon>
    <anon>zsh</anon>
  </categories>
  <description>HOGE:parameter not setzshで下記のような.zshenvのときに-uを付けているシェルスクリプトを実行すると上記のようなワーニングが出てうざったかったのでした。 #! /bin/zsh -ue if [ ! ${HOGE} ] then do some cmd #未定義時 else do some cmd fi 変数の修飾子に:- を使うと未定義のときに変数に値を設定してくれるようです。これでうざったいワーニングからおさらば。 #! /bin/zsh -ue if [ ${HOGE:-default} = &quot;default&quot; ] then do some cmd #未定義…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.masasuzu.net%2Fentry%2F2013%2F05%2F01%2Fzsh_undefined_variable&quot; title=&quot;zshの変数が未定義の時に値を入れたい - 目の前に僕らの道がある&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></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2013-05-01 13:38:53</published>
  <title>zshの変数が未定義の時に値を入れたい</title>
  <type>rich</type>
  <url>https://blog.masasuzu.net/entry/2013/05/01/zsh_undefined_variable</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
