Skip to content

Instantly share code, notes, and snippets.

@jogjayr
Last active January 4, 2018 01:39

Revisions

  1. jogjayr revised this gist Jan 4, 2018. 1 changed file with 20 additions and 17 deletions.
    37 changes: 20 additions & 17 deletions config.fish
    Original file line number Diff line number Diff line change
    @@ -4,34 +4,37 @@ function fish_user_key_bindings
    bind \e\[dw backward-kill-word
    end

    alias gs=git status

    function -d "Show git status" gs
    git status
    function portkill --description "Kill process running on port"
    kill -9 (lsof -t -i:$argv)
    end

    function gau -d "git add -u then git status"
    git add -u

    function gs --description "Show git status"
    git status
    end

    function mkcd -d "Create directory and cd to it"
    mkdir $argv
    cd $argv
    function gpus --description "Shorthand for git push"
    git push $argv
    end

    function gb -d "Runs grunt build task"
    grunt build
    function gpom --description "Shorthand for git push origin master"
    git push origin master
    end

    function gau --description "git add -u then git status"
    git add -u
    git status
    end

    function gt -d "Runs grunt test task"
    grunt test
    function mkcd --description "Create directory and cd to it"
    mkdir $argv
    cd $argv
    end

    function cpbranch -d "Copy current branch name to clipboard"
    git rev-parse --abbrev-ref HEAD | pbcopy
    function n --description "Alias for npm"
    npm $argv
    end

    function gpush -d "Runs git push origin <your_current_branch>"
    git rev-parse --abbrev-ref HEAD | xargs git push origin
    function y --description "Alias for yarn"
    yarn $argv
    end
  2. jogjayr revised this gist May 18, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion config.fish
    Original file line number Diff line number Diff line change
    @@ -33,5 +33,5 @@ function cpbranch -d "Copy current branch name to clipboard"
    end

    function gpush -d "Runs git push origin <your_current_branch>"
    git rev-parse --abbrev-ref
    git rev-parse --abbrev-ref HEAD | xargs git push origin
    end
  3. jogjayr created this gist May 17, 2015.
    37 changes: 37 additions & 0 deletions config.fish
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,37 @@
    function fish_user_key_bindings
    bind \e\[1\;9C forward-word
    bind \e\[1\;9D backward-word
    bind \e\[dw backward-kill-word
    end

    alias gs=git status

    function -d "Show git status" gs
    git status
    end

    function gau -d "git add -u then git status"
    git add -u
    git status
    end

    function mkcd -d "Create directory and cd to it"
    mkdir $argv
    cd $argv
    end

    function gb -d "Runs grunt build task"
    grunt build
    end

    function gt -d "Runs grunt test task"
    grunt test
    end

    function cpbranch -d "Copy current branch name to clipboard"
    git rev-parse --abbrev-ref HEAD | pbcopy
    end

    function gpush -d "Runs git push origin <your_current_branch>"
    git rev-parse --abbrev-ref
    end