1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Macで特定のフォルダに画像を保存したら、画像のマークダウンがクリップボードに自動でコピーされるようにする方法

Last updated at Posted at 2022-08-05

Screen Shot 2022-08-05 at 18.01.40.png

Screen Shot 2022-08-05 at 18.00.32.png

Screen Shot 2022-08-05 at 18.04.43.png

Run Shell Scriptの中身

latest_screenshot=$(ls -Art 画像/を/保存/する/パス/ | tail -n 1)
echo \!\[Screen Shot\]\( 画像/を/保存/する/パス/$latest_screenshot\)| pbcopy

latest_screenshotが.DS_Storeになってしまう場合は以下に変更する

latest_screenshot=$(ls -Art 画像/を/保存/する/パス/ | tail -n 2 | head -n 1)
echo \!\[Screen Shot\]\( 画像/を/保存/する/パス/$latest_screenshot\)| pbcopy
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?