shorten got-push a bit more, fix prompt format

This commit is contained in:
Aaron Bieber 2020-09-15 21:12:58 +00:00
parent c9f27cbaa5
commit 6eb46c9ff7
2 changed files with 3 additions and 6 deletions

View File

@ -41,7 +41,7 @@ Have your cake and eat it too!
| Name | Example | Extensions used | | Name | Example | Extensions used |
|------------+--------------------------------+-----------------| |------------+--------------------------------+-----------------|
| [[prompts/q.org][q]] | ~qbit@litr[0]:~$~ | git-prompt, got | | [[prompts/q.org][q]] | ~qbit@litr[0]:~$~ | git-prompt, got |
| [[prompts/plain.org][plain]] | ~ litr:~/src/ohmyksh/prompts$~ | - | | [[prompts/plain.org][plain]] | ~litr:~/src/ohmyksh/prompts$~ | - |
| [[prompts/og-openbsd.org][og-openbsd]] | ~$~ | - | | [[prompts/og-openbsd.org][og-openbsd]] | ~$~ | - |
| [[prompts/9.org][9]] | ~%~ | - | | [[prompts/9.org][9]] | ~%~ | - |

View File

@ -5,11 +5,8 @@
function got-push { function got-push {
local r local r
r=$(set -e; got info | awk '$1 ~ "^repository:" {print $2}') r=$(set -e; got info | awk '$1 ~ "^repository:" {print $2}')
if [ "$r" != "" ]; then [ -z "$r" ] && return 1
(cd "$r" && git push "$@") (cd "$r" && git push "$@")
else
return 1
fi
} }
function got-sync { function got-sync {