Skip to content

Instantly share code, notes, and snippets.

@znz
Created May 2, 2012 17:08
Show Gist options
  • Save znz/2578280 to your computer and use it in GitHub Desktop.
Save znz/2578280 to your computer and use it in GitHub Desktop.
http://www.manabii.info/2012/05/bash-wn.html のスクリプトを PROMPT_COMMAND を使うように変更
#!/bin/bash
# usage: . ./woo_nyaa.bash
LANG="ja_JP.UTF-8"
WOO_NYAA_STRINT=(
"(」・ω・)」うー!"
"(/・ω・)/にゃー!"
"(」・ω・)」うー!"
"(/・ω・)/にゃー!"
"(」・ω・)」うー!"
"(/・ω・)/にゃー!"
"・・・・・・"
"Let's\(・ω・)/にゃー!"
)
woo_nyaa_index_succ () {
WOO_NYAA_INDEX=$(( ($WOO_NYAA_INDEX + 1) % ${#WOO_NYAA_STRINT[@]} ))
}
PROMPT_COMMAND=woo_nyaa_index_succ
PS1='${WOO_NYAA_STRINT[$WOO_NYAA_INDEX]} \$ '
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment