Can move this to nano_env or maybe functions.sh and just have it be generic.