<commit_before># This tool gives you quick access to your recent files
#
# INSTALL:
#   Source this file somewhere in your shell rc (.bashrc or .zshrc).
#
# USE:
#   f foo # list recent files mathcing foo
#   f foo bar # list recent files mathcing foo and bar
#   f -e vim foo # run vim on the most frecent file matching foo
#
# OPTIONS:
#   -h show a brief help message
#   -l list only
#   -e set command to execute on the result file
#   -a match files and directories
#   -d match directories only
#   -f match files only
#   -r match by rank only
#   -t match by recent access only
#
# TIPS:
#   alias z="f -d -e cd"
#   alias v="f -e vim"
#   alias m="f -e mplayer"
#   alias o="f -e xdg-open"

_f() {

  if [ "$1" = "--add" ]; then # add entries
    shift

    # blacklists
    local each
    for each in "${_F_BLACKLIST[@]}"; do
      [[ "$*" =~ "$each" ]] && return
    done

    set -- $(echo $*)

    # shifts
    for each in "${_F_SHIFT[@]}"; do
      while [ "$1" = "$each" ]; do shift; done
    done

    # ignores
    [[ "${_F_IGNORE[@]}" =~ "$1" ]] && return
    shift

    local FILES file
    while [ "$1" ]; do
      for file in $(eval echo $1); do # expand
        $_F_READLINK -e $file &> /dev/null # check if $arg is a valid file
        # add the adsolute path of the file to FILES
        [ $? -eq 0 ] && FILES="$FILES $($_F_READLINK -e "$file")"
      done
      shift
    done

    # bail out if we don't own ~/.f (we're another user but our ENV is still set)
    [ -f "$_F_DATA" -a ! -O "$_F_DATA" ] && return<commit_msg>Add _F_TRACK_PWD option<commit_after># This tool gives you quick access to your recent files
#
# INSTALL:
#   Source this file somewhere in your shell rc (.bashrc or .zshrc).
#
# USE:
#   f foo # list recent files mathcing foo
#   f foo bar # list recent files mathcing foo and bar
#   f -e vim foo # run vim on the most frecent file matching foo
#
# OPTIONS:
#   -h show a brief help message
#   -l list only
#   -e set command to execute on the result file
#   -a match files and directories
#   -d match directories only
#   -f match files only
#   -r match by rank only
#   -t match by recent access only
#
# TIPS:
#   alias z="f -d -e cd"
#   alias v="f -e vim"
#   alias m="f -e mplayer"
#   alias o="f -e xdg-open"

_f() {

  if [ "$1" = "--add" ]; then # add entries
    shift

    # blacklists
    local each
    for each in "${_F_BLACKLIST[@]}"; do
      [[ "$*" =~ "$each" ]] && return
    done

    set -- $(echo $*)

    # shifts
    for each in "${_F_SHIFT[@]}"; do
      while [ "$1" = "$each" ]; do shift; done
    done

    # ignores
    [[ "${_F_IGNORE[@]}" =~ "$1" ]] && return
    shift

    local FILES file
    while [ "$1" ]; do
      for file in $(eval echo $1); do # expand
        $_F_READLINK -e $file &> /dev/null # check if $arg is a valid file
        # add the adsolute path of the file to FILES
        [ $? -eq 0 ] && FILES="$FILES $($_F_READLINK -e "$file")"
      done
      shift
    done

    # add current pwd if the option set
    [ "$_F_TRACK_PWD" ] && FILES="$FILES $(pwd -P)"

    # bail out if we don't own ~/.f (we're another user but our ENV is still set)
    [ -f "$_F_DATA" -a ! -O "$_F_DATA" ] && return
{'fraction_non_alphanumeric': 0.14129415442325727, 'fraction_numerical': 0.003751172241325414, 'mean_word_length': 2.252032520325203, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '989901', 'n_tokens_mistral': 1156, 'n_tokens_neox': 1115, 'n_words': 450}