<commit_before>set -l builtin_packages {$OMF_PATH,$OMF_CONFIG}/pkg*/{omf,fish-spec}


function omf.packages.list -d 'List installed packages'
  set -l show_plugins
  set -l show_themes

  if begin; contains -- --plugin $argv; or contains -- -p $argv; end
    set -e show_themes
  end

  if begin; contains -- --theme $argv; or contains -- -t $argv; end
    set show_themes
    set -e show_plugins
  end

  set -l plugins_paths $OMF_PATH/pkg/*
  set -l themes_paths $OMF_PATH/themes/*

  if set -q show_plugins
    for path in $plugins_paths
      contains $path $builtin_packages; or command basename $path
    end
  end

  if set -q show_themes
    for path in $themes_paths
      command basename $path
    end
  end
end<commit_msg>cli: list pkgs and themes from OMF_CONFIG<commit_after>set -l builtin_packages {$OMF_PATH,$OMF_CONFIG}/pkg*/{omf,fish-spec}


function omf.packages.list -d 'List installed packages'
  set -l show_plugins
  set -l show_themes

  if begin; contains -- --plugin $argv; or contains -- -p $argv; end
    set -e show_themes
  end

  if begin; contains -- --theme $argv; or contains -- -t $argv; end
    set show_themes
    set -e show_plugins
  end

  set -l plugins_paths {$OMF_CONFIG, $OMF_PATH}/pkg/*
  set -l themes_paths {$OMF_CONFIG, $OMF_PATH}/themes/*

  if set -q show_plugins
    for path in $plugins_paths
      contains $path $builtin_packages; or command basename $path
    end
  end

  if set -q show_themes
    for path in $themes_paths
      command basename $path
    end
  end
end
{'fraction_non_alphanumeric': 0.09501965923984272, 'fraction_numerical': 0.0, 'mean_word_length': 2.885496183206107, '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': '4146609', 'n_tokens_mistral': 535, 'n_tokens_neox': 511, 'n_words': 177}