Here's a very **very** stupid nimdir.sh script that I find useful: #!/bin/sh libPath=~/.choosenim/toolchains/nim-0.18.0/lib # libPath=$(choosenim --noColor show | grep ' Path: ' | awk '{print $2}')/lib nimFile=$(find $libPath -iname $1.nim | sed 1q) [ -f "$nimFile" ] || exit 1 echo "outline $nimFile" | nimsuggest $nimFile 2>/dev/null |\ grep '^outline' | awk '{print $3 " " $2}' Run
You could in theory write a nim macro that calls nimsuggest and parses the output. A much better solution would be to have a nim module that does this internally.