<commit_before># Usage: scoop reset <app>
# Summary: Reset an app to resolve conflicts
# Help: Used to resolve conflicts in favor of a particular app. For example,
# if you've installed 'python' and 'python27', you can use 'scoop reset' to switch between
# using one or the other.
param($app)

. "$psscriptroot\..\lib\core.ps1"
. "$psscriptroot\..\lib\manifest.ps1"
. "$psscriptroot\..\lib\help.ps1"
. "$psscriptroot\..\lib\install.ps1"
. "$psscriptroot\..\lib\versions.ps1"

if(!$app) { 'ERROR: <app> missing'; my_usage; exit 1 }

if(!(installed $app)) { abort "$app isn't installed" }

$version = current_version $app
"resetting $app ($version)"

$dir = resolve-path (versiondir $app $version)
$manifest = installed_manifest $app $version

create_shims $manifest $dir $false
env_add_path $manifest $dir
env_set $manifest $dir<commit_msg>Add support for resetting scoop<commit_after># Usage: scoop reset <app>
# Summary: Reset an app to resolve conflicts
# Help: Used to resolve conflicts in favor of a particular app. For example,
# if you've installed 'python' and 'python27', you can use 'scoop reset' to switch between
# using one or the other.
param($app)

. "$psscriptroot\..\lib\core.ps1"
. "$psscriptroot\..\lib\manifest.ps1"
. "$psscriptroot\..\lib\help.ps1"
. "$psscriptroot\..\lib\install.ps1"
. "$psscriptroot\..\lib\versions.ps1"

if(!$app) { 'ERROR: <app> missing'; my_usage; exit 1 }

if ($app -eq "scoop") {
  "resetting scoop"

  if(!(test-path ~/.bashrc)) {
    'creating ~/.bashrc'
    new-item -type file ~/.bashrc | out-null
  }
  if (!(get-content ~/.bashrc | select-string 'alias scoop' -quiet)) {
    'creating bash alias for scoop...'
    'alias scoop="powershell scoop.ps1"' | out-file ~/.bashrc -en oem -append
  }
  else {
    'bash alias for scoop already exists... skipping...'
  }
} 
else {
  if(!(installed $app)) { abort "$app isn't installed" }

  $version = current_version $app
  "resetting $app ($version)"

  $dir = resolve-path (versiondir $app $version)
  $manifest = installed_manifest $app $version

  create_shims $manifest $dir $false
  env_add_path $manifest $dir
  env_set $manifest $dir
}
{'fraction_non_alphanumeric': 0.15777153558052434, 'fraction_numerical': 0.007958801498127341, 'mean_word_length': 3.867881548974943, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '3792457', 'n_tokens_mistral': 770, 'n_tokens_neox': 711, 'n_words': 223}