<commit_before>set fisher_config ~/.config/fisherman

# Set SIDE_HOME env
set -xg SIDE_HOME $HOME/side

# Set a variable to tracks
set -x PLATFORM (uname)

# Set the default editor
set -x EDITOR vim

# Use vi key binds
fish_vi_key_bindings

switch $PLATFORM
  case Linux
    source $SIDE_HOME/linux.fish
  case Darwin
    source $SIDE_HOME/darwin.fish
  case FreeBSD
    source $SIDE_HOME/bsd.fish
end

# Install a $HOME/local directory for installing local package
if test -e $HOME/local/bin
  set -xg PATH $PATH $HOME/local/bin
end
# Path for binaries installed in home
if test -e $HOME/bin
  set -xg PATH $PATH $HOME/bin 
end

# tmux unicode
function utmux
  tmux -u $argv
end

# GO
set -xg GOPATH $HOME
set -xg GO111MODULE auto

# Set environment variables
if test -e $HOME/go/bin
  set -xg PATH $PATH $HOME/go/bin
end

# Fortran
set -xg FFLAGS -ff2c

# Default to optimized compile c code
set -xg CFLAGS -O2

# Mercurial alias 
function hs
  hg status
end

# Git alias
function gs
  git status
end

# Local nim
if test -e $HOME/local/nim
  set -xg PATH $PATH $HOME/local/nim/bin
end

# Dart library installed
if test -e /usr/lib/dart/bin/
  set -xg PATH $PATH /usr/lib/dart/bin/
end


# Add pyenv to path if installed
if test -e $HOME/.pyenv/bin/pyenv
  set -xg PATH $PATH $HOME/.pyenv/bin
  set -xg  PYENV_ROOT $HOME/.pyenv
end

# If pyenv exists then run it
set pyenv_exists (which pyenv)
if [ $pyenv_exists ];  test -x $pyenv_exists
  source (pyenv init - --no-rehash | psub)
  source (pyenv virtualenv-init - | psub)
  # Found this saves a lot of startup time (like 40%) by not calling it based on using this command
  # echo '' > startup.txt && nvim --startuptime startup.txt
  if test -z "$VIMRUNTIME"
    pyenv rehash
  end
end

# Use neovim if it exists
function which_editor
  set nvim_path (which nvim)
  if [ $nvim_path ];  test -x $nvim_path
    echo nvim
  else
    echo vim
  end
end

# TODO: Figure this out
function e 
  set cmd (which_editor)
  set TERM screen-256color
  eval $cmd $argv
end


# Gui vim
function ge
  switch $PLATFORM
    case Linux
      gvim $argv
    case Darwin
      mvim $argv
  end
end

function ll
  ls -lh $argv
end


function mkenv
  mkdir -p $HOME/.venv
  pyvenv $HOME/.venv/$argv
end

function wrkenv
  source $HOME/.venv/$argv/bin/activate.fish
end


if test -e $SIDE_HOME/prompt.fish
  source $SIDE_HOME/prompt.fish
end
if test -e $HOME/.side/config.fish
  source $HOME/.side/config.fish
end

# TODO: Use nix for package installation?
# NIX
if test -e $HOME/.nix-profile/etc/profile.d/nix.sh
#eval (bash -c "source ~/.nix-profile/etc/profile.d/nix.sh; fish --command 'echo set -x NIX_PATH \"\$NIX_PATH\"\;; echo set -x PATH \"\$PATH\"\;; echo set -x SSL_CERT_FILE \"\$SSL_CERT_FILE\"'")
end


# Flutter integration
if test -e $HOME/local/zig/zig
  # Add zig to path
  set -xg PATH $PATH $HOME/local/zig
end

# Android studio if test -e $HOME/local/android-studio/bin
if test -e $HOME/local/android-studio/bin
  set -xg ANDROID_SDK_ROOT $HOME/local/android-studio/bin
  set -xg PATH $PATH $HOME/local/android-studio/bin<commit_msg>Add current path to include<commit_after>set fisher_config ~/.config/fisherman

# Set SIDE_HOME env
set -xg SIDE_HOME $HOME/side

# Set a variable to tracks
set -x PLATFORM (uname)

# Set the default editor
set -x EDITOR vim

# Use vi key binds
fish_vi_key_bindings

switch $PLATFORM
  case Linux
    source $SIDE_HOME/linux.fish
  case Darwin
    source $SIDE_HOME/darwin.fish
  case FreeBSD
    source $SIDE_HOME/bsd.fish
end

# Install a $HOME/local directory for installing local package
if test -e $HOME/local/bin
  set -xg PATH $PATH $HOME/local/bin
end
# Path for binaries installed in home
if test -e $HOME/bin
  set -xg PATH $PATH $HOME/bin 
end

# tmux unicode
function utmux
  tmux -u $argv
end

# GO
set -xg GOPATH $HOME
set -xg GO111MODULE auto

# Set environment variables
if test -e $HOME/go/bin
  set -xg PATH $PATH $HOME/go/bin
end

# Fortran
set -xg FFLAGS -ff2c

# Default to optimized compile c code
set -xg CFLAGS -O2

# Mercurial alias 
function hs
  hg status
end

# Git alias
function gs
  git status
end

# Local nim
if test -e $HOME/local/nim
  set -xg PATH $PATH $HOME/local/nim/bin
end

# Dart library installed
if test -e /usr/lib/dart/bin/
  set -xg PATH $PATH /usr/lib/dart/bin/
end


# Add pyenv to path if installed
if test -e $HOME/.pyenv/bin/pyenv
  set -xg PATH $PATH $HOME/.pyenv/bin
  set -xg  PYENV_ROOT $HOME/.pyenv
end

# If pyenv exists then run it
set pyenv_exists (which pyenv)
if [ $pyenv_exists ];  test -x $pyenv_exists
  source (pyenv init - --no-rehash | psub)
  source (pyenv virtualenv-init - | psub)
  # Found this saves a lot of startup time (like 40%) by not calling it based on using this command
  # echo '' > startup.txt && nvim --startuptime startup.txt
  if test -z "$VIMRUNTIME"
    pyenv rehash
  end
end

# Use neovim if it exists
function which_editor
  set nvim_path (which nvim)
  if [ $nvim_path ];  test -x $nvim_path
    echo nvim
  else
    echo vim
  end
end

# TODO: Figure this out
function e 
  set cmd (which_editor)
  set TERM screen-256color
  eval $cmd $argv
end


# Gui vim
function ge
  switch $PLATFORM
    case Linux
      gvim $argv
    case Darwin
      mvim $argv
  end
end

function ll
  ls -lh $argv
end


function mkenv
  mkdir -p $HOME/.venv
  pyvenv $HOME/.venv/$argv
end

function wrkenv
  source $HOME/.venv/$argv/bin/activate.fish
end


if test -e $SIDE_HOME/prompt.fish
  source $SIDE_HOME/prompt.fish
end
if test -e $HOME/.side/config.fish
  source $HOME/.side/config.fish
end

# TODO: Use nix for package installation?
# NIX
if test -e $HOME/.nix-profile/etc/profile.d/nix.sh
#eval (bash -c "source ~/.nix-profile/etc/profile.d/nix.sh; fish --command 'echo set -x NIX_PATH \"\$NIX_PATH\"\;; echo set -x PATH \"\$PATH\"\;; echo set -x SSL_CERT_FILE \"\$SSL_CERT_FILE\"'")
end

# Add current path to include path
set -xg C_INCLUDE_PATH .;$C_INCLUDE_PATH
# Local zig installation
if test -e $HOME/local/zig/zig
  # Add zig to path
  set -xg PATH $PATH $HOME/local/zig
end

# Android studio if test -e $HOME/local/android-studio/bin
if test -e $HOME/local/android-studio/bin
  set -xg ANDROID_SDK_ROOT $HOME/local/android-studio/bin
  set -xg PATH $PATH $HOME/local/android-studio/bin
{'fraction_non_alphanumeric': 0.09987216363055289, 'fraction_numerical': 0.0031959092361776927, 'mean_word_length': 3.053756476683938, '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': '1586773', 'n_tokens_mistral': 2433, 'n_tokens_neox': 2330, 'n_words': 810}