Skip to content

Instantly share code, notes, and snippets.

@michaelmrose
Last active January 27, 2016 23:51
Show Gist options
  • Save michaelmrose/332081eb04989c425027 to your computer and use it in GitHub Desktop.
Save michaelmrose/332081eb04989c425027 to your computer and use it in GitHub Desktop.
some fish functions
    function in-terminal-or-out
      if in-terminal
        eval $argv
      else
        lilyterm -e ff $argv
      end
    end
    function nr
      c $argv
      in-terminal-or-out nvim -c \'call NvimRepl\(\)\'
    end
    function in-terminal
      pstree -s %self | grep $TERMINAL > /dev/null
    end

    function c
      if test -d $argv
        set dir $argv
      else if bmark $argv > /dev/null
        set dir (bmark $argv) > /dev/null
      else
        set dir (autojump $argv) > /dev/null
      end
      cd $dir
    end
 contents of ff
 #!/usr/bin/env fish
 eval $argv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment