Skip to content

Instantly share code, notes, and snippets.

@mensly
Created December 22, 2021 08:48
Show Gist options
  • Save mensly/8780b459eaa3843d5c0be097600e6aea to your computer and use it in GitHub Desktop.
Save mensly/8780b459eaa3843d5c0be097600e6aea to your computer and use it in GitHub Desktop.
Fishy functions
⋊> ~/.c/f/functions pwd
/Users/mensly/.config/fish/functions
⋊> ~/.c/f/functions cat focus.fish
function focus
cd ~/Projects/mensly/katzrdum
clear
end
⋊> ~/.c/f/functions cat github.fish
function github
~/Applications/github $argv
cd ~/Projects/$argv
end
⋊> ~/.c/f/functions cat ~/Applications/github
#!/bin/bash
cd ~/Projects
REPO=$1
USER=`echo $1 | sed 's/\/.*//'`
mkdir -p $USER
cd $USER
GITHUB='github.com'
git clone git@$GITHUB:$REPO.git
⋊> ~/.c/f/functions cat youdidntseenothing.fish
function youdidntseenothing
git commit -a --amend --no-edit; git push --no-verify --force
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment