Skip to content

Instantly share code, notes, and snippets.

@shogo82148
Created March 15, 2017 09:32
Show Gist options
  • Select an option

  • Save shogo82148/f81d006e63e3ad24c67bfb285ccb9f2c to your computer and use it in GitHub Desktop.

Select an option

Save shogo82148/f81d006e63e3ad24c67bfb285ccb9f2c to your computer and use it in GitHub Desktop.
#!/bin/bash
FILE=$(git status --short | peco | awk '{print $2}')
if [ $# -eq 0 ]; then
echo "$FILE"
exit 0
fi
git "$@" "$FILE"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment