{ pkgs, ... }: {

  programs.fish = {
    enable = true;

    functions = {
      ddg = ''
        if count $argv > /dev/null
          ${pkgs.w3m}/bin/w3m +15 "https://lite.duckduckgo.com/lite?kd=-1&q=$argv"
        else
          ${pkgs.w3m}/bin/w3m "https://lite.duckduckgo.com/lite?kd=-1"
        end
      ''; 

      hm = ''${pkgs.w3m}/bin/w3m https://nix-community.github.io/home-manager/options.xhtml'';
    };
    
    shellAliases = {
      vim = "nvim";
      vi = "nvim";
      vimin = "NVIM_APPNAME=nvim-minimal nvim";
      nano = "nvim";
    };
  };

}
