help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Make googler faster


From: Greg Wooledge
Subject: Re: Make googler faster
Date: Wed, 7 Jul 2021 16:58:14 -0400

On Wed, Jul 07, 2021 at 10:46:43PM +0200, Julius Hamilton wrote:
> I am calling a command from inside Vim which respectively calls googler, a
> command line google utility.
> 
> In Vim, this is:
> :r! googler search-term
> 
> I am wondering if there is any way to time how long this takes, in bash.

Obviously bash cannot time how long it takes you to type this.  That's
going to be the longest part, right?

Once a command starts running, then sure, you can time how long it takes
to finish running.  Simply write a wrapper script and ensure that your
vim typing calls the wrapper.  This may be as simple as putting a wrapper
named googler in ~/bin/.  Inside the wrapper, you can use "time" or
something else to perform the measurement.

> Perhaps it could return the results, plus a message at the bottom with the
> time it took.

Sounds like a job for time.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]