fish: use ruby instead of awk for word of the moment

master
an 2020-01-07 10:41:44 -05:00
parent 016aa3f431
commit e6764e6e90
2 changed files with 2 additions and 8 deletions

View File

@ -22,8 +22,8 @@ function fish_greeting
if test -f /usr/share/dict/words && test (which shuf)
set_color c50ed2
echo "Word of the moment: "(shuf -n1 /usr/share/dict/words) |
awk -f $_agw_dir_rc/text/mid.awk col=$COLUMNS
echo -n "Word of the moment: "(shuf -n1 /usr/share/dict/words) |
ruby -e 'puts $stdin.read.center ARGV[0].to_i' $COLUMNS
set_color normal
end

View File

@ -1,6 +0,0 @@
{
z = col - length
y = int(z / 2)
x = z - y
printf "%*s%s%*s\n", x, "", $0, y, ""
}