<commit_before>#!bash
#
# Copyright (C) 2017 <NAME> <<EMAIL>>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

# This script is to be called by the tcsh 'complete' command.
# It should be called by setting up a 'complete' command in the tcsh shell like this:
#
#  complete <toolName> 'p,*,`bash tcsh_completion.bash <completionFunction> <completionScript> "${COMMAND_LINE}"`,'
#  e.g.
#  complete git 'p,*,`bash tcsh_completion.bash __git_wrap__git_main /usr/share/bash-completion/completions/git "${COMMAND_LINE}"`,'

# Base bash completion script which provides some functions
# that other completions script sometimes use
bashCompletionScript=/usr/share/bash-completion/bash_completion
if [[ $(uname) == "Darwin" ]]; then
  bashCompletionScript=/usr/local/etc/bash_completion
  bashCompletionScript=~/bash_completion
fi

# Allow for debug printouts when running the script by hand
if [ "$1" == "-d" ] || [ "$1" == "--debug" ]; then
    debug=true
    shift
fi

completionFunction=$1
completionScript=$2
commandToComplete=$3

if [ "${debug}" == "true" ]; then
    echo =====================================
    echo $0 called towards $completionFunction from $completionScript 
    echo with command to complete: $commandToComplete
fi

# I've seen that sourcing this and doing completion with git
# will generate many more invalid completions than without sourcing
# this file.  But those invalid completions are discarded by the
# shell, so I haven't yet found a problem.
if [ -e ${bashCompletionScript} ]; then
	source ${bashCompletionScript}<commit_msg>Fix a test line that should have been removed<commit_after>#!bash
#
# Copyright (C) 2017 <NAME> <<EMAIL>>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

# This script is to be called by the tcsh 'complete' command.
# It should be called by setting up a 'complete' command in the tcsh shell like this:
#
#  complete <toolName> 'p,*,`bash tcsh_completion.bash <completionFunction> <completionScript> "${COMMAND_LINE}"`,'
#  e.g.
#  complete git 'p,*,`bash tcsh_completion.bash __git_wrap__git_main /usr/share/bash-completion/completions/git "${COMMAND_LINE}"`,'

# Base bash completion script which provides some functions
# that other completions script sometimes use
bashCompletionScript=/usr/share/bash-completion/bash_completion
if [[ $(uname) == "Darwin" ]]; then
  bashCompletionScript=/usr/local/etc/bash_completion
fi

# Allow for debug printouts when running the script by hand
if [ "$1" == "-d" ] || [ "$1" == "--debug" ]; then
    debug=true
    shift
fi

completionFunction=$1
completionScript=$2
commandToComplete=$3

if [ "${debug}" == "true" ]; then
    echo =====================================
    echo $0 called towards $completionFunction from $completionScript 
    echo with command to complete: $commandToComplete
fi

# I've seen that sourcing this and doing completion with git
# will generate many more invalid completions than without sourcing
# this file.  But those invalid completions are discarded by the
# shell, so I haven't yet found a problem.
if [ -e ${bashCompletionScript} ]; then
	source ${bashCompletionScript}
{'fraction_non_alphanumeric': 0.11571254567600488, 'fraction_numerical': 0.00682095006090134, 'mean_word_length': 4.774964838255977, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '3178263', 'n_tokens_mistral': 1189, 'n_tokens_neox': 1115, 'n_words': 470}