add got-clean
This commit is contained in:
parent
f15c0035bd
commit
4203badd3a
@ -17,6 +17,24 @@ function got-sync {
|
||||
got rebase master
|
||||
}
|
||||
|
||||
function got-clean {
|
||||
local _opt
|
||||
_opt=$1
|
||||
for f in $(got status | grep ^? | awk '{print $2}'); do
|
||||
case "$_opt" in
|
||||
-f)
|
||||
rm -vf "$f"
|
||||
;;
|
||||
-i)
|
||||
rm -vi "$f"
|
||||
;;
|
||||
*)
|
||||
echo "rm $f"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
function got-commit-v {
|
||||
local _width _session _args
|
||||
|
||||
|
@ -4,6 +4,7 @@ This extension adds helper functions to the [[https://gameoftrees.org/][got]] to
|
||||
|
||||
| Function | Description |
|
||||
|-------------+-------------------------------------------------------------------------|
|
||||
| ~got-clean~ | Cleans the work directory. |
|
||||
| ~got-push~ | Pushes (~git push~) from the bare repository found in ~.got/repository~ |
|
||||
| ~got-sync~ | Rebase ~master~ on top of ~[remote]/master~. Defaults to ~origin~. |
|
||||
| ~__got_ps1~ | Current got branch. Intended to be used in ~$PS1~. |
|
||||
|
Loading…
Reference in New Issue
Block a user