amazon-q-developer-cli icon indicating copy to clipboard operation
amazon-q-developer-cli copied to clipboard

bracketed paste

Open jvoeckler opened this issue 1 year ago • 3 comments

Checks

Operating system

macOS 15.7.0 (24G222)

Expected behaviour

I disabled "bracketed paste" mode, i.e. set up my .inputrc accordingly

$ cat .inputrc 
set enable-bracketed-paste off

When I paste something that contains a newline, I usually mean that newline - or I would not have captured it in my paste buffer. So, when I typed the beginning /context add paste a path including newline, I meant that newline to be ENTER.

Actual behaviour

When I paste into q chat it still needs an additional ENTER. Effectively, Q chat's readline library ignores my bracket paste settings.

Steps to reproduce

  1. Turn off your bracketed paste settings (differs from shell to shell)
  2. Capture something into your paste buffer that includes a newline, i.e. triple-click a line in a terminal and +C
  3. Paste (+V) into a Q chat.

When bracketed paste mode is active, you need to press ENTER. When bracketed paste mode is disabled, it will execute immediately.

Environment

<This will be visible to anyone. Do not include personal or sensitive information>

[q-details]
version = "1.17.1"
hash = "b0ef39f91625c36c2ed6f065628e7165fae9012c"
date = "2025-09-30T22:01:25.726592Z (6d ago)"

[system-info]
os = "macOS 15.7.0 (24G222)"
chip = "Apple M4 Pro"
total-cores = 14
memory = "48.00 GB"

[environment]
cwd = "/Users/USER"
cli-path = "/Users/USER"
install-method = "unknown"

[env-vars]
DISPLAY = "/private/tmp/com.apple.launchd.738bxO09Qd/org.xquartz:0"
PATH = "/Users/USER/.local/share/mise/installs/python/3.13.7/bin:/Users/USER/bin:/opt/homebrew/bin:/opt/homebrew/Cellar/[email protected]/2.12.20/bin:/opt/homebrew/sbin:/Users/USER/.local/bin:/Users/USER/.toolbox/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/opt/X11/bin:/Library/Apple/usr/bin:/Users/USER/.local/bin:/Users/USER/Library/Application Support/JetBrains/Toolbox/scripts"
QTERM_SESSION_ID = "3db4f59576eb4a87b54a256670224b87"
Q_SET_PARENT_CHECK = "1"
Q_TERM = "1.17.1"
SHELL = "/opt/homebrew/bin/bash"
TERM = "xterm-256color"
__CFBundleIdentifier = "com.apple.Terminal"

jvoeckler avatar Oct 06 '25 17:10 jvoeckler

Currently, q chat does not honor .inputrc configuration. This could be a feature request? We use rusty-readline for our input implementation which may have some utilities to support this.

mschrage avatar Oct 16 '25 18:10 mschrage

The GNU readline library respects .inputrc.

I really do not like bracketed paste - that seems to be the default everywhere these days - and I don't see a way to turn it off in Q.

Jens.

On Thu, Oct 16, 2025 at 11:31 AM Matt Schrage @.***> wrote:

mschrage left a comment (aws/amazon-q-developer-cli#3110) https://github.com/aws/amazon-q-developer-cli/issues/3110#issuecomment-3412283762

Currently, q chat does not honor .inputrc configuration. This could be a feature request? We use rusty-readline for our input implementation which may have some utilities to support this.

— Reply to this email directly, view it on GitHub https://github.com/aws/amazon-q-developer-cli/issues/3110#issuecomment-3412283762, or unsubscribe https://github.com/notifications/unsubscribe-auth/AETMCPECEBSGT2ZAZICGWKT3X7QBVAVCNFSM6AAAAACINYO4D2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTIMJSGI4DGNZWGI . You are receiving this because you authored the thread.Message ID: @.***>

-- Jens-S. Vöckler (private) @.***

jvoeckler avatar Oct 16 '25 22:10 jvoeckler

While at it, could you also consider tilde expansion, i.e.

/save ~/X

Failed to export to ~/X: No such file or directory (os error 2)

On Thu, Oct 16, 2025 at 11:31 AM Matt Schrage @.***> wrote:

mschrage left a comment (aws/amazon-q-developer-cli#3110) https://github.com/aws/amazon-q-developer-cli/issues/3110#issuecomment-3412283762

Currently, q chat does not honor .inputrc configuration. This could be a feature request? We use rusty-readline for our input implementation which may have some utilities to support this.

— Reply to this email directly, view it on GitHub https://github.com/aws/amazon-q-developer-cli/issues/3110#issuecomment-3412283762, or unsubscribe https://github.com/notifications/unsubscribe-auth/AETMCPECEBSGT2ZAZICGWKT3X7QBVAVCNFSM6AAAAACINYO4D2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTIMJSGI4DGNZWGI . You are receiving this because you authored the thread.Message ID: @.***>

-- Jens-S. Vöckler (private) @.***

jvoeckler avatar Oct 17 '25 19:10 jvoeckler