fish: use ruby instead of awk for word of the moment
parent
016aa3f431
commit
e6764e6e90
|
@ -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
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
z = col - length
|
||||
y = int(z / 2)
|
||||
x = z - y
|
||||
printf "%*s%s%*s\n", x, "", $0, y, ""
|
||||
}
|
Loading…
Reference in New Issue