Display 'cd' accessible path to mtp device in Nemo

To be usable as a path you have to URL-encode the string that you get from Nemo.

To do so the following oneliner should return the command to use to cd into your mtp device:

echo -n mtp://[usb:001,007] | python -c "import sys,urllib; \
print 'cd /run/user/1000/gvfs/mtp:host='+urllib.quote(sys.stdin.readline().replace('mtp://',''))"

it returns:

cd /run/user/1000/gvfs/mtp:host=%5Busb%3A001%2C007%5D