<commit_before>#!/bin/bash

set -e 
set -u 

BASE="/opt/ui/data/dev/"
TRNS="A:/"

while [ true ]; do
  echo "Listening ...";
  nc -l 127.0.0.1 5115 | while read -r fn ; do
    echo ">>> $fn";

    # Now translate to local filesystem path ...
    echo $BASE
    FILES=$(echo "$fn" | sed -r "s|$BASE|$TRNS|g")

    echo "   > $FILES"

    # Invoke Sublime
    '/cygdrive/c/Program Files/Sublime Text 2/sublime_text.exe' "$FILES" &
    echo<commit_msg>- support different commands<commit_after>#!/bin/bash

set -e 
set -u 

BASE="/opt/ui/data/dev/"
TRNS="A:/"

while [ true ]; do
  echo "Listening ...";
  nc -l 127.0.0.1 5115 | while read -r -a 'RARG' ; do
    echo ">>> $RARG";
    echo "  > $RARG[0]"

    case $RARG[1] in
      EDIT)
        # Now translate to local filesystem path ...
        FILES=$(echo "$fn" | sed -r "s|$BASE|$TRNS|g")

        echo "   > $FILES"

        # Invoke Sublime
        # '/cygdrive/c/Program Files/Sublime Text 2/sublime_text.exe' "$FILES" & ;
        ;;

      SHELL)
        # TODO
        DIR=FILES=$(echo "$fn" | sed -r "s|$BASE|$TRNS|g")
        echo "Opening shell at $DIR"
        ;;

      EXPLORE)
        # TODO
        DIR=FILES=$(echo "$fn" | sed -r "s|$BASE|$TRNS|g")
        echo "Opening explorer at $DIR"
        ;;

      *)
        echo "Unknown command $RARG[1]";
        ;;
    esac

    echo
{'fraction_non_alphanumeric': 0.17878338278931752, 'fraction_numerical': 0.018545994065281898, 'mean_word_length': 1.9073275862068966, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '3285085', 'n_tokens_mistral': 566, 'n_tokens_neox': 501, 'n_words': 128}