Skip to content

Commit 2af0029

Browse files
committed
refactor(shell): Rename environment variables from Q_ to KIRO_ prefix
Replace all Q_ prefixed environment variables with KIRO_ prefix across shell integration files for rebranding. This includes: - Shell script variables (Q_SHELL, Q_PARENT, Q_TERM, etc.) - Autosuggest configuration variables (Q_AUTOSUGGEST_* to KIRO_AUTOSUGGEST_*) - Prompt variables (Q_USER_PS1, Q_LAST_PS1, etc.) - Internal state variables (Q_HAS_SET_PROMPT, Q_IS_LOGIN_SHELL, etc.) Changes affect: - All inline shell completion zsh files - Shell integration scripts for bash, fish, and zsh - Both pre and post shell hook scripts - Legacy comment descriptions updated from CodeWhisperer to Kiro Also removed stale analysis and todo files. 🤖 Assisted by Amazon Q Developer
1 parent c92e3c0 commit 2af0029

File tree

20 files changed

+196
-508
lines changed

20 files changed

+196
-508
lines changed

.amazonq/cli-todo-lists/1761593302615.json

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"tasks":[{"task_description":"Update post.zsh script Q_ variables to KIRO_","completed":true},{"task_description":"Update post.bash script Q_ variables to KIRO_","completed":true},{"task_description":"Update pre.sh script Q_ variables to KIRO_","completed":true},{"task_description":"Update inline shell completion config.zsh Q_AUTOSUGGEST variables","completed":true},{"task_description":"Update remaining inline shell completion .zsh files","completed":true}],"description":"Update shell integration files from Q_ to KIRO_ environment variables","context":["Updated post.zsh script to use KIRO_ prefixed environment variables instead of Q_ prefixed ones","Updated post.bash script to use KIRO_ prefixed environment variables instead of Q_ prefixed ones","Updated pre.sh script to use KIRO_ prefixed environment variables instead of Q_ prefixed ones","Updated config.zsh to use KIRO_AUTOSUGGEST variables instead of Q_AUTOSUGGEST","Updated all remaining inline shell completion .zsh files to use KIRO_AUTOSUGGEST variables instead of Q_AUTOSUGGEST"],"modified_files":["crates/fig_integrations/src/shell/scripts/post.zsh","crates/fig_integrations/src/shell/scripts/post.bash","crates/fig_integrations/src/shell/scripts/pre.sh","crates/fig_integrations/src/shell/inline_shell_completion/config.zsh","crates/fig_integrations/src/shell/inline_shell_completion/*.zsh"],"id":"1761667777935"}

MIGRATION_ANALYSIS.md

Lines changed: 0 additions & 312 deletions
This file was deleted.

crates/fig_integrations/src/shell/inline_shell_completion/async.zsh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,33 +6,33 @@
66
_q_autosuggest_async_request() {
77
zmodload zsh/system 2>/dev/null # For `$sysparams`
88

9-
typeset -g _Q_AUTOSUGGEST_ASYNC_FD _Q_AUTOSUGGEST_CHILD_PID
9+
typeset -g _KIRO_AUTOSUGGEST_ASYNC_FD _KIRO_AUTOSUGGEST_CHILD_PID
1010

1111
# If we've got a pending request, cancel it
12-
if [[ -n "$_Q_AUTOSUGGEST_ASYNC_FD" ]] && { true <&$_Q_AUTOSUGGEST_ASYNC_FD } 2>/dev/null; then
12+
if [[ -n "$_KIRO_AUTOSUGGEST_ASYNC_FD" ]] && { true <&$_KIRO_AUTOSUGGEST_ASYNC_FD } 2>/dev/null; then
1313
# Close the file descriptor and remove the handler
14-
exec {_Q_AUTOSUGGEST_ASYNC_FD}<&-
15-
zle -F $_Q_AUTOSUGGEST_ASYNC_FD
14+
exec {_KIRO_AUTOSUGGEST_ASYNC_FD}<&-
15+
zle -F $_KIRO_AUTOSUGGEST_ASYNC_FD
1616

1717
# We won't know the pid unless the user has zsh/system module installed
18-
if [[ -n "$_Q_AUTOSUGGEST_CHILD_PID" ]]; then
18+
if [[ -n "$_KIRO_AUTOSUGGEST_CHILD_PID" ]]; then
1919
# Zsh will make a new process group for the child process only if job
2020
# control is enabled (MONITOR option)
2121
if [[ -o MONITOR ]]; then
2222
# Send the signal to the process group to kill any processes that may
2323
# have been forked by the suggestion strategy
24-
kill -TERM -$_Q_AUTOSUGGEST_CHILD_PID 2>/dev/null
24+
kill -TERM -$_KIRO_AUTOSUGGEST_CHILD_PID 2>/dev/null
2525
else
2626
# Kill just the child process since it wasn't placed in a new process
2727
# group. If the suggestion strategy forked any child processes they may
2828
# be orphaned and left behind.
29-
kill -TERM $_Q_AUTOSUGGEST_CHILD_PID 2>/dev/null
29+
kill -TERM $_KIRO_AUTOSUGGEST_CHILD_PID 2>/dev/null
3030
fi
3131
fi
3232
fi
3333

3434
# Fork a process to fetch a suggestion and open a pipe to read from it
35-
exec {_Q_AUTOSUGGEST_ASYNC_FD}< <(
35+
exec {_KIRO_AUTOSUGGEST_ASYNC_FD}< <(
3636
# Tell parent process our pid
3737
echo $sysparams[pid]
3838
@@ -48,10 +48,10 @@ _q_autosuggest_async_request() {
4848
is-at-least 5.8 || command true
4949

5050
# Read the pid from the child process
51-
read _Q_AUTOSUGGEST_CHILD_PID <&$_Q_AUTOSUGGEST_ASYNC_FD
51+
read _KIRO_AUTOSUGGEST_CHILD_PID <&$_KIRO_AUTOSUGGEST_ASYNC_FD
5252

5353
# When the fd is readable, call the response handler
54-
zle -F "$_Q_AUTOSUGGEST_ASYNC_FD" _q_autosuggest_async_response
54+
zle -F "$_KIRO_AUTOSUGGEST_ASYNC_FD" _q_autosuggest_async_response
5555
}
5656

5757
# Called when new data is ready to be read from the pipe

0 commit comments

Comments
 (0)