Bug 459812 - sudo / doas Injecting Itself Onto the Current Line When Trying to Autocomplete Command Argements
Summary: sudo / doas Injecting Itself Onto the Current Line When Trying to Autocomplet...
Status: REPORTED
Alias: None
Product: yakuake
Classification: Applications
Component: general (other bugs)
Version First Reported In: 22.08.1
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Eike Hein
URL:
Keywords: needs_verification
Depends on:
Blocks:
 
Reported: 2022-09-29 05:01 UTC by nekonexus
Modified: 2022-09-29 05:01 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description nekonexus 2022-09-29 05:01:29 UTC
SUMMARY
For some reason, I noticed this when either an application calls either sudo or doas (regardless of which) or if an alias is made to pre-pend either of those to a command (like pacman or paru, for example) and the command is used where the arguments could potentially auto-complete like, say, something like this:

(aliased "sudo pacman") pacman -U ./package-name<tab-to-complete-filepath>

or:

paru -U ./package-name<tab-to-complete-filepath>

For some reason, this causes Yakuake to graphically write in-line *over* what was typed instead of moving over to the next line, like it's normally supposed to, and simultaneous ignores the auto-complete request and tries to run the command as-is.

Given the nature of the issue, I have no idea if it's a shell bug or if the terminal emulator is responsible for this behavior? I don't know how terminals handle shells. (For context, I use fish)


STEPS TO REPRODUCE
1. cp a package from the system: from /var/cache/pacman/pkg/ to the current directory or just run (sudo pacman aliased) "pacman -U /var/cache/pacman/pkg/<package-filename-example> and attempt to autocomplete it (similarly, this can be also done with paru without any aliasing)
2. Alternatively, have doas installed and perform the same task

OBSERVED RESULT
doas (neko-san@ARCH) password: aru > clone 
(What you see above with "aru > clone" is just the folder path I was currently in; as you can see, it decided to inject doas into the current line)

EXPECTED RESULT
Text corruption on the current line to not occur and interfere with the command being executed

SOFTWARE/OS VERSIONS
Linux: Arch Linux
KDE Plasma Version: 5.25.5
KDE Frameworks Version: 5.98.0
Qt Version: 5.15.6

ADDITIONAL INFORMATION
N/A