#author("2024-03-19T21:48:58+09:00","default:nobuoki","nobuoki") #author("2024-03-19T21:49:16+09:00","default:nobuoki","nobuoki") * はじめに [#se390379] mintty や wsltty で(白黒じゃなくて)カラーの絵文字を出す方法です - 絵文字pngファイルをダウンロード -- 絵文字png用ディレクトリ作成 -- 絵文字pngダウンロードスクリプトの準備 -- 絵文字pngダウンロード - mintty/wslttyのオプション設定で絵文字を有効化 追記 - 2024/03/19 wslttyの最速手順を追記 - 2024/03/19 wslttyのダウンロード手順を修正 - 2021/05/11 cygwinの場合を追記 * やり方 [#jc4303a7] ** 絵文字pngファイルをダウンロード [#md8d6f8b] wslttyは1行でOK - [[GitHub - mintty/wsltty: Mintty as a terminal for Bash on Ubuntu on Windows / WSL>https://github.com/mintty/wsltty]] #prism(bash){{{ (cd "$(wslpath "$APPDATA/wsltty/emojis")" && ./getemojis -d) }}} mintty #prism(bash){{{ # MSYS2(mintty)の場合 emojis_dir="$(echo "$APPDATA/mintty" | sed -re 's;^(.).;/\L\1;' -e 's;\\;/;g')/emojis" # cygwin(mintty)の場合 emojis_dir="$(cygpath "$APPDATA")/mintty/emojis" # 以下、同一手順 getemojis_url='https://raw.githubusercontent.com/mintty/mintty/master/tools/getemojis' getemojis_script="${getemojis_url##*/}" # 絵文字png用ディレクトリ作成 mkdir -p "$emojis_dir" || true cd "$emojis_dir" || exit 1 # 絵文字pngダウンロードスクリプトの準備 [ -e "$getemojis_script" ] && rm -rf "$getemojis_script" wget "$getemojis_url" sed -i '/postproc=sh/s;sh;bash;' "${getemojis_script}" # sh -> bash に修正 # 絵文字pngダウンロード(そこそこ時間が掛かります) bash "${getemojis_script}" -d }}} ** mintty/wslttyのオプション設定で絵文字を有効化 [#i3b77d7d] 上記がうまく進めば、mintty/wslttyのオプション設定画面で絵文字の種類が選べるようになります #ref(./mintty-option.png); 例えば windows を選択するとこうなります curl https://raw.githubusercontent.com/ryuichiueda/ShellGeiData/master/vol.47/unko #ref(./unko.png); * 備考 [#y96c58cd] - [[Tips · mintty/mintty Wiki · GitHub>https://github.com/mintty/mintty/wiki/Tips#emojis]] - [[mintty/getemojis at master · mintty/mintty · GitHub>https://github.com/mintty/mintty/blob/master/tools/getemojis]] - [[【問題と解答】jus共催 第47回引きこもりシェル芸勉強会 | 上田ブログ>https://b.ueda.tech/?post=20200425_shellgei_47]]