Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationEventAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
7
Help us understand the problem. What are the problem?

More than 5 years have passed since last update.

@saekis

zshでtypoしたときのメッセージを可愛くする

$ sl
zsh: command not found: sl

カワイクナイ(´・ω・`)

zshではコマンドが無い場合command_not_found_handlerでフック出来るっぽいので、~/.zshrcに下記を追加。

.zshrc
function command_not_found_handler() {
  echo "(」・ω・)」うー!(/・ω・)/にゃー!→「$1」";
}
$ sl
(」・ω・)」うー!(/・ω・)/にゃー!→「sl」

カワイイ(๑˃̵ᴗ˂̵)و

ちなみにbashではcommand_not_found_handleでフックする。rいらない。

.bashrc
function command_not_found_handle() {
  echo "(」・ω・)」うー!(/・ω・)/にゃー!→「$1」";
}

参考

http://cpplover.blogspot.jp/2015/05/blog-post_28.html
http://pgmot.hatenablog.com/entry/2015/06/01/125049

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
7
Help us understand the problem. What are the problem?