aboutsummaryrefslogtreecommitdiff
path: root/zsh/functions/figlet-sample.zsh
diff options
context:
space:
mode:
authorRuben Beltran del Rio <ruben@unlimited.pizza>2020-09-23 10:34:22 +0200
committerRuben Beltran del Rio <ruben@unlimited.pizza>2020-09-23 10:34:22 +0200
commit7fdbf6d86aa768799f715539065e1ebc31a16be2 (patch)
tree9165a358d3c0f0c80c0c91d281ce671d6ea3d652 /zsh/functions/figlet-sample.zsh
parent61396837deb12e031c13091c1f9e4bc20db6b185 (diff)
Add figlet sample
Diffstat (limited to 'zsh/functions/figlet-sample.zsh')
-rw-r--r--zsh/functions/figlet-sample.zsh9
1 files changed, 9 insertions, 0 deletions
diff --git a/zsh/functions/figlet-sample.zsh b/zsh/functions/figlet-sample.zsh
new file mode 100644
index 0000000..70b7591
--- /dev/null
+++ b/zsh/functions/figlet-sample.zsh
@@ -0,0 +1,9 @@
+# Print a string with all the figlet fonts
+figlet-sample () {
+ if [[ -n "${1+x}" ]]
+ then
+ ls -FG `figlet -I 2` | grep --color=auto 'flf' | xargs -I '{}' basename '{}' '.flf' | xargs -I '{}' figlet -f '{}' $1
+ else
+ echo 'Usage: figlet-sample <string>'
+ fi
+}