Mercurial > repo
annotate bin/whoq @ 12523:67a2e5342dad draft default tip
<b_jonas> learn The password of the month is outside the scope of this wisdom entry.
author | HackEso <hackeso@esolangs.org> |
---|---|
date | Tue, 01 Apr 2025 08:17:53 +0100 (5 days ago) |
parents | 3d6b560fc682 |
children |
rev | line source |
---|---|
11594
27e437aef877
<fizzie> fetch bin/whoq https://hack.esolangs.org/get/bin/whoq
HackEso <hackeso@esolangs.org>
parents:
11593
diff
changeset
|
1 if [[ "$1" =~ ^[0-9]+$ ]]; then |
12121
3d6b560fc682
<fizzie> sled /hackenv/bin/whoq//s|quotes|${HACKENV-/hackenv}/quotes|
HackEso <hackeso@esolangs.org>
parents:
11594
diff
changeset
|
2 rev="$(hg blame ${HACKENV-/hackenv}/quotes | sed "$1{s/^ *//;s/:.*//;q};d")" |
11591
8d0288361b28
<fizzie> fetch bin/whoq https://hack.esolangs.org/get/bin/whoq
HackEso <hackeso@esolangs.org>
parents:
diff
changeset
|
3 if [[ -n "$rev" ]]; then |
8d0288361b28
<fizzie> fetch bin/whoq https://hack.esolangs.org/get/bin/whoq
HackEso <hackeso@esolangs.org>
parents:
diff
changeset
|
4 hg log -r "$rev" -T "{desc}" |
8d0288361b28
<fizzie> fetch bin/whoq https://hack.esolangs.org/get/bin/whoq
HackEso <hackeso@esolangs.org>
parents:
diff
changeset
|
5 else |
8d0288361b28
<fizzie> fetch bin/whoq https://hack.esolangs.org/get/bin/whoq
HackEso <hackeso@esolangs.org>
parents:
diff
changeset
|
6 echo "$1: no such quote" |
8d0288361b28
<fizzie> fetch bin/whoq https://hack.esolangs.org/get/bin/whoq
HackEso <hackeso@esolangs.org>
parents:
diff
changeset
|
7 fi |
8d0288361b28
<fizzie> fetch bin/whoq https://hack.esolangs.org/get/bin/whoq
HackEso <hackeso@esolangs.org>
parents:
diff
changeset
|
8 else |
11593
eb873414aa9c
<fizzie> fetch bin/whoq https://hack.esolangs.org/get/bin/whoq
HackEso <hackeso@esolangs.org>
parents:
11591
diff
changeset
|
9 echo "usage: \`whoq N" |
11591
8d0288361b28
<fizzie> fetch bin/whoq https://hack.esolangs.org/get/bin/whoq
HackEso <hackeso@esolangs.org>
parents:
diff
changeset
|
10 fi |