fix: git commands

This commit is contained in:
2024-06-18 01:18:15 +03:00
parent 7cc7c06bab
commit 385b61da1b
2 changed files with 5 additions and 4 deletions

View File

@@ -1,7 +1,8 @@
#!/usr/bin/env zsh
type echo_cyan >/dev/null || source "$DOTFILES/zplug.init.zsh"
type src >/dev/null || source "$DOTFILES/zplug.init.zsh"
echo_yellow "Preparing..."
src exports
if is_mac && [[ ! -d "$HOME/Library/ApplicationSupport" ]]; then
ln -s "$HOME/Library/Application Support" "$HOME/Library/ApplicationSupport"

View File

@@ -143,7 +143,7 @@ git_open_new_pr() {
fi
repo_path=$(git_get_repo_path $remote)
branch=$(git branch --show-current)
branch=$([[ ! -z $1 ]] && echo "$1" || git branch --show-current)
default_branch=$(git remote show $remote | grep "HEAD branch" | awk '{print $3}')
if [[ -z $default_branch ]]; then
default_branch="master"
@@ -221,7 +221,7 @@ git_open() {
;;
prs)
shift
git_open_pr_list $@
git_open_pr_list
;;
pr)
shift
@@ -229,7 +229,7 @@ git_open() {
;;
actions|pipelines|ci)
shift
git_open_pipelines $@
git_open_pipelines
;;
*)
echo "Unknown command: $1"