<commit_before>;;; core/cli/env.el -*- lexical-binding: t; -*-

(dispatcher! env
  (let ((env-file (abbreviate-file-name doom-env-file)))
    (pcase (car args)
      ("refresh"
       (doom-reload-env-file 'force))
      ("enable"
       (setenv "DOOMENV" "1")
       (print! (green "Enabling auto-reload of %S" env-file))
       (doom-reload-env-file 'force)
       (print! (green "Done! `doom reload' will now refresh your envvar file.")))
      ("clear"
       (setenv "DOOMENV" nil)
       (unless (file-exists-p env-file)
         (user-error "%S does not exist to be cleared" env-file))
       (delete-file env-file)
       (print! (green "Disabled envvar file by deleting %S" env-file)))
      (_
       (message "No valid subcommand provided. See `doom help env`."))))
  "Manages your envvars file.

  env [SUBCOMMAND]

Available subcommands:

  refresh  Create or regenerate your envvar file
  enable   enable auto-reloading of your envvars file (on `doom refresh`)<commit_msg>Fix wrong-number-args error on doom env<commit_after>;;; core/cli/env.el -*- lexical-binding: t; -*-

(dispatcher! env
  (let ((env-file (abbreviate-file-name doom-env-file)))
    (pcase (car args)
      ("refresh"
       (doom-reload-env-file 'force))
      ("enable"
       (setenv "DOOMENV" "1")
       (print! (green "Enabling auto-reload of %S") env-file)
       (doom-reload-env-file 'force)
       (print! (green "Done! `doom reload' will now refresh your envvar file.")))
      ("clear"
       (setenv "DOOMENV" nil)
       (unless (file-exists-p env-file)
         (user-error "%S does not exist to be cleared" env-file))
       (delete-file env-file)
       (print! (green "Disabled envvar file by deleting %S") env-file))
      (_
       (message "No valid subcommand provided. See `doom help env`."))))
  "Manages your envvars file.

  env [SUBCOMMAND]

Available subcommands:

  refresh  Create or regenerate your envvar file
  enable   enable auto-reloading of your envvars file (on `doom refresh`)
{'fraction_non_alphanumeric': 0.14014014014014015, 'fraction_numerical': 0.001001001001001001, 'mean_word_length': 2.771698113207547, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '569216', 'n_tokens_mistral': 665, 'n_tokens_neox': 655, 'n_words': 206}