<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>tokizuoh</author_name>
  <author_url>https://blog.hatena.ne.jp/tokizuoh/</author_url>
  <blog_title>カルボナーラ街道</blog_title>
  <blog_url>https://tokizuoh.hatenablog.com/</blog_url>
  <categories>
    <anon>Shell</anon>
  </categories>
  <description>前提としてoh-my-zsh*1を利用。 モチベーション 作業ログを書いている際にコマンドをコピーしたい場面がある。今まではマウスで選択して右クリックでコピーをしていたが自動化チャンスだと思ったのでやる。 コマンド全体 &gt; echo `history -1` | cut -f 2- -d &quot; &quot; | pbcopy アプローチ zshのコマンドの履歴は ~/.zsh_history に保存されているので覗いてみる。 &gt; cat ~/.zsh_history | head -n 5 : 1661521409:0;ls : 1661521409:0;gs : 1661521409:0;cd cont…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftokizuoh.hatenablog.com%2Fentry%2F2022%2F09%2F18%2F175628&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>2022-09-18 17:56:28</published>
  <title>zshで直前に実行したコマンドをクリップボードにコピーする</title>
  <type>rich</type>
  <url>https://tokizuoh.hatenablog.com/entry/2022/09/18/175628</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
