Skip to content

Instantly share code, notes, and snippets.

@onokatio
Last active January 26, 2018 03:27
Show Gist options
  • Save onokatio/4642f8ab172db5dcfd6b930fb4c47f8e to your computer and use it in GitHub Desktop.
Save onokatio/4642f8ab172db5dcfd6b930fb4c47f8e to your computer and use it in GitHub Desktop.
コマンドを間違えるたびに美少女に罵られたい! ref: https://qiita.com/onokatio/items/4930e4b23339edd05d47
function command_not_found_handle(){
if [ -e /usr/bin/jp2a ];then
if [ -e ~/kirino.jpg ];then
jp2a ~/kirino.jpg -i
fi
fi
echo "ハァ…?$1とか何言ってんの?\nコマンドもろくに覚えられないなんて、アンタどうしようもないクズね。"
}
$ sudo apt install jp2a # for Debian,Ubuntu
$ brew install jp2a # for MacOSX,Linuxbrew
function command_not_found_handler --on-event fish_command_not_found
if type -q jp2a; and test -e ~/kirino.jpg
jp2a ~/kirino.jpg -i
end
echo ハァ…?$argv[1]とか何言ってんの?
echo コマンドもろくに覚えられないなんて、アンタどうしようもないクズね。
end
function command_not_found_handler --on-event fish_command_not_found
if type -q jp2a; and test -e ~/kirino.jpg
jp2a ~/kirino.jpg -i
end
echo ハァ…?$argv[1]とか何言ってんの?
echo コマンドもろくに覚えられないなんて、アンタどうしようもないクズね。
end
$ jp2a hoge.jpg --width=100 # 横幅を100列固定で表示
$ jp2a hoge.jpg --height=100 # 横幅を100列固定で表示
$ jp2a hoge.jpg -i # 白黒反転で表示
$ imgcat hoge.jpg
$ img2sixel hoge.jpg
$ img2sixel hoge.gif -l disable # -l disableを付けないとアニメがループしてプロンプトが帰ってこない
function command_not_found_handler(){
if [ -e /usr/bin/jp2a ];then
if [ -e ~/kirino.jpg ];then
jp2a ~/kirino.jpg -i
fi
fi
echo "ハァ…?$1とか何言ってんの?\nコマンドもろくに覚えられないなんて、アンタどうしようもないクズね。"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment