<commit_before>function __fzf_find

  set -l word (commandline -t)
  set -l dirs
  set -l files

  for w in (eval string split / $word)
    if [ $w = '' ]
      if [ (count $dirs) -eq 0 ]
        set dirs ''
      end
      if [ (count $files) -eq 0 ]
        continue
      end
    end
    if [ (count $files) -eq 0 -a -d (string join / $dirs $w) ]
      set dirs $dirs $w
    else
      set files $files $w
    end
  end

  if not count $dirs >/dev/null
    set dirs '.'
  end
  set dirs (string join / $dirs '')

  if not count $files >/dev/null
    set files ''
  end

  command find -L $dirs -mindepth 1 -path '*/\.*' -prune -o -printf '%P\0' 2> /dev/null |\
    fzf --read0 --print0 -m --prompt $dirs --query (string join / $files) |\
    while read --null --local select
      set selects $selects (builtin string escape "$dirs/$select")
    end<commit_msg>fish の find キーバインドで maxdepth を 3 に制限<commit_after>function __fzf_find

  set -l word (commandline -t)
  set -l dirs
  set -l files

  for w in (eval string split / $word)
    if [ $w = '' ]
      if [ (count $dirs) -eq 0 ]
        set dirs ''
      end
      if [ (count $files) -eq 0 ]
        continue
      end
    end
    if [ (count $files) -eq 0 -a -d (string join / $dirs $w) ]
      set dirs $dirs $w
    else
      set files $files $w
    end
  end

  if not count $dirs >/dev/null
    set dirs '.'
  end
  set dirs (string join / $dirs '')

  if not count $files >/dev/null
    set files ''
  end

  command find -L $dirs -mindepth 1 -maxdepth 3 -path '*/\.*' -prune -o -printf '%P\0' 2> /dev/null |\
    fzf --read0 --print0 -m --prompt $dirs --query (string join / $files) |\
    while read --null --local select
      set selects $selects (builtin string escape "$dirs/$select")
    end
{'fraction_non_alphanumeric': 0.1366988088485536, 'fraction_numerical': 0.01020986954055587, 'mean_word_length': 1.813397129186603, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '6790294', 'n_tokens_mistral': 677, 'n_tokens_neox': 652, 'n_words': 242}