From e9f4d99018d750740d4eb06ebcebfe3d23b57abd Mon Sep 17 00:00:00 2001 From: kkashilk Date: Wed, 29 Oct 2025 10:25:08 -0700 Subject: [PATCH 1/7] feat(build): Parameterize binary names in build scripts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add CHAT_BINARY_BRANCH and CLI_BINARY_NAME_MINIMAL to const.py - Import CHAT_BINARY_BRANCH and TAURI_PRODUCT_NAME in build.py - Replace hardcoded 'qchat' with CHAT_BINARY_NAME constant - Replace hardcoded 'q_desktop' with TAURI_PRODUCT_NAME constant - Replace hardcoded 'q_cli' with CLI_PACKAGE_NAME constant - Replace hardcoded 'prod' with CHAT_BINARY_BRANCH constant - Update comments to use generic binary name placeholders 🤖 Assisted by Amazon Q Developer --- build-scripts/build.py | 26 ++++++++++++++------------ build-scripts/const.py | 2 ++ 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/build-scripts/build.py b/build-scripts/build.py index 499204a4f..48c0bdadd 100644 --- a/build-scripts/build.py +++ b/build-scripts/build.py @@ -36,6 +36,7 @@ from importlib import import_module from const import ( APP_NAME, + CHAT_BINARY_BRANCH, CHAT_BINARY_NAME, CHAT_PACKAGE_NAME, CLI_BINARY_NAME, @@ -51,6 +52,7 @@ MACOS_BUNDLE_ID, PTY_BINARY_NAME, PTY_PACKAGE_NAME, + TAURI_PRODUCT_NAME, URL_SCHEMA, ) @@ -179,7 +181,7 @@ def fetch_chat_bin(chat_build_bucket_name: str | None, chat_download_role_arn: s warn("missing required chat arguments, creating dummy binary") dummy_dir = BUILD_DIR / "dummy_chat" dummy_dir.mkdir(exist_ok=True) - dummy_path = dummy_dir / f"qchat-{get_target_triple()}" + dummy_path = dummy_dir / f"{CHAT_BINARY_NAME}-{get_target_triple()}" dummy_path.write_text("#!/usr/bin/env sh\n\necho dummy chat binary\n") set_executable(dummy_path) return dummy_path @@ -205,21 +207,21 @@ def fetch_chat_bin(chat_build_bucket_name: str | None, chat_download_role_arn: s ) # The path to the download should be: - # BUILD_BUCKET/prod/latest/{target}/qchat.zip + # BUILD_BUCKET/{CHAT_BINARY_BRANCH}/latest/{target}/{CHAT_BINARY_NAME}.zip target = get_target_triple() - chat_bucket_path = f"prod/latest/{target}/qchat.zip" + chat_bucket_path = f"{CHAT_BINARY_BRANCH}/latest/{target}/{CHAT_BINARY_NAME}.zip" chat_dl_dir = BUILD_DIR / "chat_download" chat_dl_dir.mkdir(exist_ok=True) - chat_dl_path = chat_dl_dir / "qchat.zip" - info(f"Downloading qchat zip from bucket: {chat_bucket_path} and path: {chat_bucket_path}") + chat_dl_path = chat_dl_dir / f"{CHAT_BINARY_NAME}.zip" + info(f"Downloading {CHAT_BINARY_NAME} zip from bucket: {chat_bucket_path} and path: {chat_bucket_path}") s3.download_file(chat_build_bucket_name, chat_bucket_path, chat_dl_path) # unzip and return the path to the contained binary run_cmd(["unzip", "-o", chat_dl_path, "-d", chat_dl_dir]) # Append target triple, as expected by tauri cli. - chat_path = chat_dl_dir / f"qchat-{target}" - (chat_dl_dir / "qchat").rename(chat_path) + chat_path = chat_dl_dir / f"{CHAT_BINARY_NAME}-{target}" + (chat_dl_dir / CHAT_BINARY_NAME).rename(chat_path) return chat_path @@ -341,7 +343,7 @@ def build_macos_desktop_app( manifest_path.unlink(missing_ok=True) tauri_config_path.unlink(missing_ok=True) - target_bundle = pathlib.Path(f"target/{target}/release/bundle/macos/q_desktop.app") + target_bundle = pathlib.Path(f"target/{target}/release/bundle/macos/{TAURI_PRODUCT_NAME}.app") app_path = BUILD_DIR / f"{APP_NAME}.app" shutil.rmtree(app_path, ignore_errors=True) shutil.copytree(target_bundle, app_path) @@ -466,9 +468,9 @@ def build_linux_minimal(cli_path: pathlib.Path, pty_path: pathlib.Path, chat_pat Creates tar.gz, tar.xz, tar.zst, and zip archives under `BUILD_DIR`. Each archive has the following structure: - - archive/bin/q - - archive/bin/qterm - - archive/bin/qchat + - archive/bin/{cli_binary} + - archive/bin/{pty_binary} + - archive/bin/{chat_binary} - archive/install.sh - archive/README - archive/BUILD-INFO @@ -879,7 +881,7 @@ def build( else: signing_data = None - cargo_features: Mapping[str, Sequence[str]] = {"q_cli": ["wayland"]} + cargo_features: Mapping[str, Sequence[str]] = {CLI_PACKAGE_NAME: ["wayland"]} match stage_name: case "prod" | None: diff --git a/build-scripts/const.py b/build-scripts/const.py index 8f3b19dcd..e3db6fade 100644 --- a/build-scripts/const.py +++ b/build-scripts/const.py @@ -3,12 +3,14 @@ APP_NAME = "Amazon Q" CLI_BINARY_NAME = "q" +CLI_BINARY_NAME_MINIMAL = "q-minimal" CHAT_BINARY_NAME = "qchat" PTY_BINARY_NAME = "qterm" DESKTOP_BINARY_NAME = "q-desktop" URL_SCHEMA = "q" TAURI_PRODUCT_NAME = "q_desktop" LINUX_PACKAGE_NAME = "amazon-q" +CHAT_BINARY_BRANCH = "prod" # macos specific MACOS_BUNDLE_ID = "com.amazon.codewhisperer" From 7362da61d847cccb8a823d4bfee7e072d53b9a18 Mon Sep 17 00:00:00 2001 From: kkashilk Date: Wed, 29 Oct 2025 10:26:05 -0700 Subject: [PATCH 2/7] feat(build): Parameterize manifest.py with binary name constants MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Import APP_NAME, CLI_BINARY_NAME, PTY_BINARY_NAME, CHAT_BINARY_NAME - Replace hardcoded 'Amazon Q.app' with f-string using APP_NAME - Replace hardcoded binary paths and identifiers with constants 🤖 Assisted by Amazon Q Developer --- build-scripts/manifest.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/build-scripts/manifest.py b/build-scripts/manifest.py index c31ce46cc..61f450089 100644 --- a/build-scripts/manifest.py +++ b/build-scripts/manifest.py @@ -1,7 +1,7 @@ from dataclasses import dataclass from enum import Enum -from const import APPLE_TEAM_ID +from const import APPLE_TEAM_ID, APP_NAME, CLI_BINARY_NAME, PTY_BINARY_NAME, CHAT_BINARY_NAME class CdSigningType(Enum): @@ -52,21 +52,21 @@ def manifest( def app_manifest(): return manifest( - name="Amazon Q.app", + name=f"{APP_NAME}.app", identifier="com.amazon.codewhisperer", entitlements=True, embedded_requirements=[ EmbeddedRequirement( - path="Contents/MacOS/q", - identifier="com.amazon.q", + path=f"Contents/MacOS/{CLI_BINARY_NAME}", + identifier=f"com.amazon.{CLI_BINARY_NAME}", ), EmbeddedRequirement( - path="Contents/MacOS/qterm", - identifier="com.amazon.qterm", + path=f"Contents/MacOS/{PTY_BINARY_NAME}", + identifier=f"com.amazon.{PTY_BINARY_NAME}", ), EmbeddedRequirement( - path="Contents/MacOS/qchat", - identifier="com.amazon.qchat", + path=f"Contents/MacOS/{CHAT_BINARY_NAME}", + identifier=f"com.amazon.{CHAT_BINARY_NAME}", ), ], ) From f788d885cf2eb3596b5d87a3c63d16de07dfa8e1 Mon Sep 17 00:00:00 2001 From: kkashilk Date: Wed, 29 Oct 2025 11:14:23 -0700 Subject: [PATCH 3/7] feat(build): Update qchatbuild.py comments to use generic placeholders MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Replace hardcoded 'qchat' in comments with {chat_binary} placeholder - Add REBRANDING_GUIDE.md to .gitignore 🤖 Assisted by Amazon Q Developer --- .gitignore | 1 + build-scripts/qchatbuild.py | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 8e9330d0e..527fec87e 100644 --- a/.gitignore +++ b/.gitignore @@ -49,3 +49,4 @@ book/ .env* run-build.sh +REBRANDING_GUIDE.md diff --git a/build-scripts/qchatbuild.py b/build-scripts/qchatbuild.py index 4a00ca900..bae469b49 100644 --- a/build-scripts/qchatbuild.py +++ b/build-scripts/qchatbuild.py @@ -201,7 +201,7 @@ def cd_build_signed_package(exe_path: pathlib.Path): ``` package ├─ EXECUTABLES_TO_SIGN - | ├─ qchat + | ├─ {chat_binary} ``` """ # Trying a different format without manifest.yaml and placing EXECUTABLES_TO_SIGN @@ -376,7 +376,7 @@ def sign_and_notarize(signing_data: CdSigningData, chat_path: pathlib.Path) -> p def build_macos(chat_path: pathlib.Path, signing_data: CdSigningData | None): """ - Creates a qchat.zip under the build directory. + Creates a chat binary zip under the build directory. """ chat_dst = BUILD_DIR / CHAT_BINARY_NAME chat_dst.unlink(missing_ok=True) @@ -495,7 +495,7 @@ def build_linux(chat_path: pathlib.Path, signer: GpgSigner | None): Creates tar.gz, tar.xz, tar.zst, and zip archives under `BUILD_DIR`. Each archive has the following structure: - - archive/qchat + - archive/{chat_binary} """ archive_name = CHAT_BINARY_NAME From 55de72822bbac241932f1f1b5bb05d7fb4b5ef2b Mon Sep 17 00:00:00 2001 From: kkashilk Date: Wed, 29 Oct 2025 11:16:02 -0700 Subject: [PATCH 4/7] feat(build): Update qchatmain.py description to be generic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Replace 'qchat binary' with 'chat binary' in argparse description - Remove REBRANDING_GUIDE.md from .gitignore (moved to .git/info/exclude) 🤖 Assisted by Amazon Q Developer --- .gitignore | 1 - build-scripts/qchatmain.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 527fec87e..8e9330d0e 100644 --- a/.gitignore +++ b/.gitignore @@ -49,4 +49,3 @@ book/ .env* run-build.sh -REBRANDING_GUIDE.md diff --git a/build-scripts/qchatmain.py b/build-scripts/qchatmain.py index 8389c5e65..b6142ee52 100644 --- a/build-scripts/qchatmain.py +++ b/build-scripts/qchatmain.py @@ -10,7 +10,7 @@ def __call__(self, parser, namespace, values, option_string=None): parser = argparse.ArgumentParser( prog="build", - description="Builds the qchat binary", + description="Builds the chat binary", ) subparsers = parser.add_subparsers(help="sub-command help", dest="subparser", required=True) From 35c097af44c03d72981076e06108a3686291a2d5 Mon Sep 17 00:00:00 2001 From: kkashilk Date: Wed, 29 Oct 2025 11:19:55 -0700 Subject: [PATCH 5/7] feat(rust): Parameterize hardcoded qchat.log references MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Import CHAT_BINARY_NAME in chat-cli/src/logging.rs - Import CHAT_BINARY_NAME in fig_log/src/lib.rs - Import CHAT_BINARY_NAME in chat-cli/src/cli/mod.rs - Replace hardcoded 'qchat.log' with format string using CHAT_BINARY_NAME 🤖 Assisted by Amazon Q Developer --- crates/chat-cli/src/cli/mod.rs | 7 ++++++- crates/chat-cli/src/logging.rs | 3 ++- crates/fig_log/src/lib.rs | 3 ++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/crates/chat-cli/src/cli/mod.rs b/crates/chat-cli/src/cli/mod.rs index 3e0fb43ad..637b86968 100644 --- a/crates/chat-cli/src/cli/mod.rs +++ b/crates/chat-cli/src/cli/mod.rs @@ -48,6 +48,7 @@ use crate::logging::{ use crate::os::Os; use crate::util::directories::logs_dir; use crate::util::{ + CHAT_BINARY_NAME, CLI_BINARY_NAME, GOV_REGIONS, }; @@ -216,7 +217,11 @@ impl Cli { }, log_to_stdout: std::env::var_os("Q_LOG_STDOUT").is_some() || self.verbose > 0, log_file_path: match subcommand { - RootSubcommand::Chat { .. } => Some(logs_dir().expect("home dir must be set").join("qchat.log")), + RootSubcommand::Chat { .. } => Some( + logs_dir() + .expect("home dir must be set") + .join(format!("{CHAT_BINARY_NAME}.log")), + ), _ => None, }, delete_old_log_file: false, diff --git a/crates/chat-cli/src/logging.rs b/crates/chat-cli/src/logging.rs index 60edfd9e9..3f8dbd811 100644 --- a/crates/chat-cli/src/logging.rs +++ b/crates/chat-cli/src/logging.rs @@ -14,6 +14,7 @@ use tracing_subscriber::{ fmt, }; +use crate::util::consts::CHAT_BINARY_NAME; use crate::util::env_var::Q_LOG_LEVEL; const MAX_FILE_SIZE: u64 = 10 * 1024 * 1024; @@ -76,7 +77,7 @@ pub fn initialize_logging>(args: LogArgs) -> Result>(args: LogArgs) -> Result Date: Wed, 29 Oct 2025 11:29:44 -0700 Subject: [PATCH 6/7] feat(bundle): Parameterize binary names in install scripts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add CLI_BINARY_NAME, CHAT_BINARY_NAME, PTY_BINARY_NAME variables to bundle/linux/install.sh - Replace hardcoded binary names with variables in install commands - Add DESKTOP_BINARY_NAME variable to scripts/install.sh - Replace hardcoded 'q_desktop' with DESKTOP_BINARY_NAME variable 🤖 Assisted by Amazon Q Developer --- bundle/linux/install.sh | 21 ++++++++++++--------- scripts/install.sh | 3 ++- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/bundle/linux/install.sh b/bundle/linux/install.sh index 7e5206a54..46584cf13 100755 --- a/bundle/linux/install.sh +++ b/bundle/linux/install.sh @@ -7,6 +7,9 @@ set -o errexit set -o nounset SCRIPT_DIR="$(dirname "$(readlink -f "$0")")" +CLI_BINARY_NAME="q" +CHAT_BINARY_NAME="qchat" +PTY_BINARY_NAME="qterm" log_error() { printf '\e[31m[ERROR]\e[0m %s\n' "$1" >&2 @@ -136,22 +139,22 @@ if is_target_triple_gnu && ! check_glibc_version; then fi if [ -n "${Q_INSTALL_GLOBAL:-}" ]; then - install -m 755 "$SCRIPT_DIR/bin/q" /usr/local/bin/ - install -m 755 "$SCRIPT_DIR/bin/qchat" /usr/local/bin/ - install -m 755 "$SCRIPT_DIR/bin/qterm" /usr/local/bin/ + install -m 755 "$SCRIPT_DIR/bin/$CLI_BINARY_NAME" /usr/local/bin/ + install -m 755 "$SCRIPT_DIR/bin/$CHAT_BINARY_NAME" /usr/local/bin/ + install -m 755 "$SCRIPT_DIR/bin/$PTY_BINARY_NAME" /usr/local/bin/ if [ -z "${Q_SKIP_SETUP:-}" ]; then - /usr/local/bin/q integrations install dotfiles - /usr/local/bin/q setup --global "$@" + /usr/local/bin/$CLI_BINARY_NAME integrations install dotfiles + /usr/local/bin/$CLI_BINARY_NAME setup --global "$@" fi else mkdir -p "$HOME/.local/bin" - install -m 755 "$SCRIPT_DIR/bin/q" "$HOME/.local/bin/" - install -m 755 "$SCRIPT_DIR/bin/qchat" "$HOME/.local/bin/" - install -m 755 "$SCRIPT_DIR/bin/qterm" "$HOME/.local/bin/" + install -m 755 "$SCRIPT_DIR/bin/$CLI_BINARY_NAME" "$HOME/.local/bin/" + install -m 755 "$SCRIPT_DIR/bin/$CHAT_BINARY_NAME" "$HOME/.local/bin/" + install -m 755 "$SCRIPT_DIR/bin/$PTY_BINARY_NAME" "$HOME/.local/bin/" if [ -z "${Q_SKIP_SETUP:-}" ]; then - "$HOME/.local/bin/q" setup "$@" + "$HOME/.local/bin/$CLI_BINARY_NAME" setup "$@" fi fi diff --git a/scripts/install.sh b/scripts/install.sh index f05b33f4b..246f2f59e 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -10,6 +10,7 @@ set -eu BINARY_NAME="q" CLI_NAME="Q CLI" COMMAND_NAME="q" +DESKTOP_BINARY_NAME="q_desktop" BASE_URL="https://desktop-release.q.us-east-1.amazonaws.com" MANIFEST_URL="${BASE_URL}/latest/manifest.json" MACOS_FILENAME="Amazon Q.dmg" @@ -360,7 +361,7 @@ install_macos() { mkdir -p "$HOME/.local/bin" local macos_bin="$MACOS_APP_DIR/$app_name/Contents/MacOS" - "$macos_bin/q_desktop" --no-dashboard > /dev/null 2>&1 & + "$macos_bin/$DESKTOP_BINARY_NAME" --no-dashboard > /dev/null 2>&1 & } # Install on Linux From 8281d9b0ea8ec24cacb142cfa337eac0cb879b6e Mon Sep 17 00:00:00 2001 From: kkashilk Date: Wed, 29 Oct 2025 12:07:51 -0700 Subject: [PATCH 7/7] fix(shell): Add shellcheck SC2329 disable directives MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add SC2329 to bash-preexec.sh __bp_adjust_histcontrol function - Add SC2329 disable before override function in shell integration generator - Add cfg_attr to suppress dead_code warning on Windows for list_profiles_blocking - Regenerate test snapshots with updated shellcheck directives SC2329 warns about functions defined after being called, which is intentional in our bash-preexec override pattern. 🤖 Assisted by Amazon Q Developer --- crates/chat-cli/src/cli/chat/context.rs | 1 + crates/fig_integrations/src/shell/mod.rs | 2 ++ crates/fig_integrations/src/shell/scripts/bash-preexec.sh | 2 +- .../init__init_snapshot_bash_post_bash_profile.snap | 5 +++-- .../snapshots/init__init_snapshot_bash_post_bashrc.snap | 5 +++-- .../snapshots/init__init_snapshot_bash_pre_bash_profile.snap | 5 +++-- .../tests/snapshots/init__init_snapshot_bash_pre_bashrc.snap | 5 +++-- 7 files changed, 16 insertions(+), 9 deletions(-) diff --git a/crates/chat-cli/src/cli/chat/context.rs b/crates/chat-cli/src/cli/chat/context.rs index 9727ed928..4aff145fc 100644 --- a/crates/chat-cli/src/cli/chat/context.rs +++ b/crates/chat-cli/src/cli/chat/context.rs @@ -251,6 +251,7 @@ impl ContextManager { /// /// # Returns /// A Result containing a vector of profile names, with "default" always first + #[cfg_attr(target_os = "windows", allow(dead_code))] pub fn list_profiles_blocking(&self, os: &Os) -> Result> { let _ = self; diff --git a/crates/fig_integrations/src/shell/mod.rs b/crates/fig_integrations/src/shell/mod.rs index 85a8d3371..ef76ebe2d 100644 --- a/crates/fig_integrations/src/shell/mod.rs +++ b/crates/fig_integrations/src/shell/mod.rs @@ -198,6 +198,7 @@ impl ShellExt for Shell { include_str!("scripts/bash-preexec.sh"), "}\n", "__fig_source_bash_preexec\n", + "# shellcheck disable=SC2329\n", "function __bp_adjust_histcontrol() { :; }\n", include_str!("scripts/pre.sh") ) @@ -208,6 +209,7 @@ impl ShellExt for Shell { include_str!("scripts/bash-preexec.sh"), "}\n", "__fig_source_bash_preexec\n", + "# shellcheck disable=SC2329\n", "function __bp_adjust_histcontrol() { :; }\n", include_str!("scripts/post.bash") ) diff --git a/crates/fig_integrations/src/shell/scripts/bash-preexec.sh b/crates/fig_integrations/src/shell/scripts/bash-preexec.sh index f78835c8a..fe92daab2 100644 --- a/crates/fig_integrations/src/shell/scripts/bash-preexec.sh +++ b/crates/fig_integrations/src/shell/scripts/bash-preexec.sh @@ -88,7 +88,7 @@ __bp_require_not_readonly() { # Remove ignorespace and or replace ignoreboth from HISTCONTROL # so we can accurately invoke preexec with a command from our # history even if it starts with a space. -# shellcheck disable=SC2317 +# shellcheck disable=SC2317,SC2329 __bp_adjust_histcontrol() { local histcontrol histcontrol="${HISTCONTROL:-}" diff --git a/crates/q_cli/tests/snapshots/init__init_snapshot_bash_post_bash_profile.snap b/crates/q_cli/tests/snapshots/init__init_snapshot_bash_post_bash_profile.snap index 00f094cbf..c75b8a0c7 100644 --- a/crates/q_cli/tests/snapshots/init__init_snapshot_bash_post_bash_profile.snap +++ b/crates/q_cli/tests/snapshots/init__init_snapshot_bash_post_bash_profile.snap @@ -1,5 +1,5 @@ --- -source: q_cli/tests/init.rs +source: crates/q_cli/tests/init.rs expression: init --- Q_SHELL="/bin/zsh" @@ -94,7 +94,7 @@ __bp_require_not_readonly() { # Remove ignorespace and or replace ignoreboth from HISTCONTROL # so we can accurately invoke preexec with a command from our # history even if it starts with a space. -# shellcheck disable=SC2317 +# shellcheck disable=SC2317,SC2329 __bp_adjust_histcontrol() { local histcontrol histcontrol="${HISTCONTROL:-}" @@ -387,6 +387,7 @@ if [[ -z "${__bp_delay_install:-}" ]]; then fi; } __fig_source_bash_preexec +# shellcheck disable=SC2329 function __bp_adjust_histcontrol() { :; } if [[ -n "${BASH:-}" ]]; then diff --git a/crates/q_cli/tests/snapshots/init__init_snapshot_bash_post_bashrc.snap b/crates/q_cli/tests/snapshots/init__init_snapshot_bash_post_bashrc.snap index 00f094cbf..c75b8a0c7 100644 --- a/crates/q_cli/tests/snapshots/init__init_snapshot_bash_post_bashrc.snap +++ b/crates/q_cli/tests/snapshots/init__init_snapshot_bash_post_bashrc.snap @@ -1,5 +1,5 @@ --- -source: q_cli/tests/init.rs +source: crates/q_cli/tests/init.rs expression: init --- Q_SHELL="/bin/zsh" @@ -94,7 +94,7 @@ __bp_require_not_readonly() { # Remove ignorespace and or replace ignoreboth from HISTCONTROL # so we can accurately invoke preexec with a command from our # history even if it starts with a space. -# shellcheck disable=SC2317 +# shellcheck disable=SC2317,SC2329 __bp_adjust_histcontrol() { local histcontrol histcontrol="${HISTCONTROL:-}" @@ -387,6 +387,7 @@ if [[ -z "${__bp_delay_install:-}" ]]; then fi; } __fig_source_bash_preexec +# shellcheck disable=SC2329 function __bp_adjust_histcontrol() { :; } if [[ -n "${BASH:-}" ]]; then diff --git a/crates/q_cli/tests/snapshots/init__init_snapshot_bash_pre_bash_profile.snap b/crates/q_cli/tests/snapshots/init__init_snapshot_bash_pre_bash_profile.snap index ef7e36f89..f22a81479 100644 --- a/crates/q_cli/tests/snapshots/init__init_snapshot_bash_pre_bash_profile.snap +++ b/crates/q_cli/tests/snapshots/init__init_snapshot_bash_pre_bash_profile.snap @@ -1,5 +1,5 @@ --- -source: q_cli/tests/init.rs +source: crates/q_cli/tests/init.rs expression: init --- Q_SHELL="/bin/zsh" @@ -95,7 +95,7 @@ __bp_require_not_readonly() { # Remove ignorespace and or replace ignoreboth from HISTCONTROL # so we can accurately invoke preexec with a command from our # history even if it starts with a space. -# shellcheck disable=SC2317 +# shellcheck disable=SC2317,SC2329 __bp_adjust_histcontrol() { local histcontrol histcontrol="${HISTCONTROL:-}" @@ -388,6 +388,7 @@ if [[ -z "${__bp_delay_install:-}" ]]; then fi; } __fig_source_bash_preexec +# shellcheck disable=SC2329 function __bp_adjust_histcontrol() { :; } #!/usr/bin/env bash diff --git a/crates/q_cli/tests/snapshots/init__init_snapshot_bash_pre_bashrc.snap b/crates/q_cli/tests/snapshots/init__init_snapshot_bash_pre_bashrc.snap index ef7e36f89..f22a81479 100644 --- a/crates/q_cli/tests/snapshots/init__init_snapshot_bash_pre_bashrc.snap +++ b/crates/q_cli/tests/snapshots/init__init_snapshot_bash_pre_bashrc.snap @@ -1,5 +1,5 @@ --- -source: q_cli/tests/init.rs +source: crates/q_cli/tests/init.rs expression: init --- Q_SHELL="/bin/zsh" @@ -95,7 +95,7 @@ __bp_require_not_readonly() { # Remove ignorespace and or replace ignoreboth from HISTCONTROL # so we can accurately invoke preexec with a command from our # history even if it starts with a space. -# shellcheck disable=SC2317 +# shellcheck disable=SC2317,SC2329 __bp_adjust_histcontrol() { local histcontrol histcontrol="${HISTCONTROL:-}" @@ -388,6 +388,7 @@ if [[ -z "${__bp_delay_install:-}" ]]; then fi; } __fig_source_bash_preexec +# shellcheck disable=SC2329 function __bp_adjust_histcontrol() { :; } #!/usr/bin/env bash