Dash Ver.2로 CheatSheet 혼자 만들기!상당히 좋다!
어쨌든 눈동자 기능은 Chaeat Sheet으로 참고가 아니라 이른바 비슷한 지령집 같은 것을 열람할 수 있다.
그리고 이 Chaeat Sheet은 루비의 DSL로 간단하게 혼자만의 물건을 만들 수 있다.이번에는 그 방법을 설명해 드리겠습니다.
전제 조건
CheatSheet 제작 단계
후술한 순서대로 루비 파일을 쓰면 이런 cheatheet을 만들 수 있습니다!이번에는 깃 커맨즈라는 지령집을 만들었다.
(왼쪽 목록에 있는 Git Commands의 Git는 기본적으로 준비된 영어 cheatheet)
CheatSheet을 만들기 위해 다음 동작을 수행합니다
$ sudo gem install cheatset # dashが読み込むdocsetファイルの生成に必要
$ xcode-select --install # Xcode Xcode Command Line Toolsをインストールしていない場合は実行
$ vim git_commands.rb # チートシートのファイル名(任意)。ファイルの内容は後述
$ cheatset generate git_commands.rb # docsetファイルに変換
# cheatset command not foundのようなことを言われる場合は source .zshrcなりターミナルを閉じるなりしてからコマンド再実行
$ open git_commands.docset # 生成されたdocsetをdashに読み込む
CheatSheet 컨텐트
라벨의 내용은 루비의 DSL로 기술되어 있습니다.일본어도 돼요.다음 내용 중 캡처와 같은 내용을 생성합니다.
git_commands.rb
cheatsheet do
title 'Git Commands'
docset_file_name 'git_commands'
keyword 'git'
source_url 'http://cheat.kapeli.com'
category do
id 'コミット'
entry do
name '部分的にコミット'
notes <<-'CODE'
```bash
$ git add -p hoge.txt
```
CODE
end
end
category do
id '変更を退避'
entry do
name '変更を一時退避'
notes <<-'CODE'
```bash
$ git stash
```
CODE
end
entry do
name '変更に名前をつけて退避'
notes <<-'CODE'
```bash
$ git stash save 'hogehoge'
```
CODE
end
entry do
name 'stashを一覧表示'
notes <<-'CODE'
```bash
$ git stash list
```
CODE
end
entry do
name '最新のstashを復元'
notes <<-'CODE'
```bash
$ git stash pop
```
CODE
end
entry do
name '特定のstashを復元'
notes <<-'CODE'
```bash
$ git stash pop stash@{1}
```
CODE
end
end
end
참조 페이지
Reference
이 문제에 관하여(Dash Ver.2로 CheatSheet 혼자 만들기!상당히 좋다!), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/akira-hamada/items/9e95ca60880f7fa6acf9텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)