대한민국/서울특별시/종로구/명륜동/우리집/내컴퓨터대한민국/서울특별시/종로구/명륜동/우리집 을 등록PATH=$PATH:/대한민국/서울특별시/종로구/명륜동/우리집
PATH=$PATH:/usr/local/bin
PATH=${PATH}:$(find ~/code -type d | tr '\n' ':' | sed 's/:$//')
This will append every directory in your ~/code tree to the current path. I don't like the idea myself, preferring to have only a couple of directories holding my own executables and explicitly listing them, but to each their own.
If you want to exclude all directories which are hidden, you basically need to strip out every line that has the sequence "/." (to ensure that you don't check subdirectories under hidden directories as well):
PATH=${PATH}:$(find ~/code -type d | sed '/\/\\./d' | tr '\n' ':' | sed 's/:$//')
This will stop you from getting directories such as ~/code/level1/.hidden/level3/ (i.e., it stops searching within sub-trees as soon as it detects they're hidden). If you only want to keep the hidden directories out, but still allow non-hidden directories under them, use:
PATH=${PATH}:$(find ~/code -type d -name '[^\.]*' | tr '\n' ':' | sed 's/:$//')
This would allow ~/code/level1/.hidden2/level3/ but disallow~/code/level1/.hidden2/.hidden3/ since -name only checks the base name of the file, not the full path name.