_custom.zsh 394 B

1234567891011121314151617
  1. function custsh_script() {
  2. echo $HOME/.zsh/custom/$1.zsh
  3. }
  4. CUSTOM_SHELL_SCRIPT=$(custsh_script $CUSTOM_SHELL)
  5. if [ -f "$CUSTOM_SHELL_SCRIPT" ] && [ ! -x "$CUSTOM_SHELL_SCRIPT" ]; then
  6. source $CUSTOM_SHELL_SCRIPT
  7. fi
  8. function custsh() {
  9. CUSTOM_SHELL_SCRIPT=$(custsh_script $1)
  10. if [ -x "$CUSTOM_SHELL_SCRIPT" ]; then
  11. source $CUSTOM_SHELL_SCRIPT
  12. else
  13. CUSTOM_SHELL=$1 zsh
  14. fi
  15. }