Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
JY8752 committed Mar 30, 2024
1 parent 14caf80 commit eb6f429
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
24 changes: 23 additions & 1 deletion .zshrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# CodeWhisperer pre block. Keep at the top of this file.
[[ -f "${HOME}/Library/Application Support/codewhisperer/shell/zshrc.pre.zsh" ]] && builtin source "${HOME}/Library/Application Support/codewhisperer/shell/zshrc.pre.zsh"
#[[ -f "${HOME}/Library/Application Support/codewhisperer/shell/zshrc.pre.zsh" ]] && builtin source "${HOME}/Library/Application Support/codewhisperer/shell/zshrc.pre.zsh"
PROMPT='
%*'\$vcs_info_msg_0_'
%F{blue}[%~]%f %# '
Expand Down Expand Up @@ -139,3 +139,25 @@ export PATH="$BUN_INSTALL/bin:$PATH"

# CodeWhisperer post block. Keep at the bottom of this file.
[[ -f "${HOME}/Library/Application Support/codewhisperer/shell/zshrc.post.zsh" ]] && builtin source "${HOME}/Library/Application Support/codewhisperer/shell/zshrc.post.zsh"

# Google Cloud
#
# function config_rprompt() {
# project_id=$(gcloud config configurations list --format=json | jq -r '.[] | select(.is_active == true) | .properties.core.project')
# RPROMPT=%F{032}[${project_id}]%f
# }

function config_rprompt() {
project_id=$(awk '/project/{print $3}' ~/.config/gcloud/configurations/config_default)
PS1="%F{135}[${project_id}]%f $PS1"
}

# The following function is executed when the terminal is first started.
config_rprompt

function gpr() {
project=$(gcloud projects list --format=json | jq -r '.[].projectId' | peco)
gcloud config set project ${project}

config_rprompt
}
4 changes: 2 additions & 2 deletions vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@
"git.enableSmartCommit": true,
"git.openRepositoryInParentFolders": "always",
"github.copilot.enable": {
"*": false,
"markdown": false,
"*": true,
"plaintext": false,
"markdown": false,
"scminput": false
},
"go.toolsManagement.autoUpdate": true,
Expand Down

0 comments on commit eb6f429

Please sign in to comment.