diff options
| author | Ruben Beltran del Rio <ruben@unlimited.pizza> | 2020-09-23 10:34:22 +0200 |
|---|---|---|
| committer | Ruben Beltran del Rio <ruben@unlimited.pizza> | 2020-09-23 10:34:22 +0200 |
| commit | 7fdbf6d86aa768799f715539065e1ebc31a16be2 (patch) | |
| tree | 9165a358d3c0f0c80c0c91d281ce671d6ea3d652 | |
| parent | 61396837deb12e031c13091c1f9e4bc20db6b185 (diff) | |
Add figlet sample
| -rw-r--r-- | runcoms/zshrc | 1 | ||||
| -rw-r--r-- | zsh/functions/figlet-sample.zsh | 9 | ||||
| -rw-r--r-- | zsh/functions/graphviz.zsh | 2 |
3 files changed, 11 insertions, 1 deletions
diff --git a/runcoms/zshrc b/runcoms/zshrc index 2cd5ce2..af64bbe 100644 --- a/runcoms/zshrc +++ b/runcoms/zshrc @@ -5,6 +5,7 @@ source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/functions/git-info.zsh" source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/functions/dotenv.zsh" source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/functions/graphviz.zsh" source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/functions/short-uptime.zsh" +source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/functions/figlet-sample.zsh" ################################################################################ # Load Modules 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 +} diff --git a/zsh/functions/graphviz.zsh b/zsh/functions/graphviz.zsh index d7b4e12..f62f9b2 100644 --- a/zsh/functions/graphviz.zsh +++ b/zsh/functions/graphviz.zsh @@ -11,7 +11,7 @@ neat-to-png () { if [[ -n "${1+x}" ]]; then neato -Tpng $1 -o ${1%.*}.png else - echo 'Usage: dot-to-png <path_to_file>' + echo 'Usage: neat-to-png <path_to_file>' fi } |