main.py:411: RuntimeWarning: coroutine 'files' was never awaited
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
async def files(search_cmd: str):
search = await asyncio.create_subprocess_shell(
search_cmd,
stderr=asyncio.subprocess.PIPE,
stdout=asyncio.subprocess.PIPE
)
result = await search.communicate()
print(f'[{search_cmd!r} exited with {search.returncode}]')
if result:
print(f'[result]\n{result.decode()}')
result = await asyncio.run(search.files(search_cmd))
os.popen(f'grep {filter} "{text}" ./files/*').read()