<commit_before># Manage Homebrew casks.
function cask_edit --argument-names token
    if test -z $token
        echo "Usage: cask_edit token"
        return 1
    end

    pushd (brew --repository)/Library/Taps/caskroom/homebrew-cask
    git checkout master
    git pull
    git checkout -b $token

    if brew cask info $token >/dev/null 2>&1
        # If token exists, edit it
        brew cask edit $token
    else
        # Otherwise, create
        brew cask create $token
    end
end<commit_msg>[cask_edit] Add optional version arg<commit_after># Manage Homebrew casks.
function cask_edit --argument-names token version
    set -l branch $token

    if test -z "$token"
        echo "Usage: cask_edit token [version]"
        return 1
    else if test -n "$version"
        set branch $token"-"$version
    end

    pushd (brew --repository)/Library/Taps/caskroom/homebrew-cask
    git checkout master
    git pull
    git checkout -b $branch

    if brew cask info $token >/dev/null 2>&1
        # If token exists, edit it
        brew cask edit $token
    else
        # Otherwise, create
        brew cask create $token
    end
end
{'fraction_non_alphanumeric': 0.0780701754385965, 'fraction_numerical': 0.005263157894736842, 'mean_word_length': 2.2140845070422537, 'pattern_counts': {'":': 0, '<': 3, '<?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': '7133542', 'n_tokens_mistral': 359, 'n_tokens_neox': 340, 'n_words': 129}