以下の内容はhttps://blog.kyanny.me/entry/2021/04/30/020121より取得しました。


How to create and update a gist by `gh` command

Creating a gist is straightforward, but editing a gist is a little tricky.

gh gist | GitHub CLI

Create a gist

gh gist create | GitHub CLI

❯ shuf -n 3 /usr/share/dict/words > words.txt

❯ cat words.txt
oomantia
syngenic
expensive

❯ gh gist create words.txt
- Creating gist words.txt
✓ Created gist words.txt
https://gist.github.com/f030560cfe3134340963a6031f89c3a3

View a gist

gh gist list | GitHub CLI

gh gist view | GitHub CLI

❯ id=$(gh gist list -L 1 | awk '{print $1}')

❯ gh gist view $id
oomantia
syngenic
expensive

Edit a gist

gh gist edit | GitHub CLI

❯ shuf -n 3 /usr/share/dict/words > words.txt

❯ cat words.txt
Gourinae
triticism
neocracy

❯ gh gist edit $id -a words.txt

❯ gh gist view $id
Gourinae
triticism
neocracy

If you use -f option instead of -a, a text editor is launched to edit the file. If $EDITOR is not set, nano is used.




以上の内容はhttps://blog.kyanny.me/entry/2021/04/30/020121より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14