Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

  for fname in $(ls ~/.config/zsh/functions); do source $fname; done
:)


That’s the exact opposite. That’s eagerly loading all defined functions. autoloading means the function isn’t loaded until it’s used.


When are you going to run that?

GP is talking about JIT loaded functions: 'that is, not defined in your shell's rc file'.


for fname in ~/.config/zsh/functions/*; do source $fname; done

will prevent issues with special chars and spaces in filenames




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: