Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using commandline when trapping a signal in background #10126

Open
iGr33k opened this issue Nov 28, 2023 · 1 comment
Open

Using commandline when trapping a signal in background #10126

iGr33k opened this issue Nov 28, 2023 · 1 comment
Labels
bug Something that's not working as intended
Milestone

Comments

@iGr33k
Copy link

iGr33k commented Nov 28, 2023

~> fish --version
fish, version 3.6.1
~> echo $version
3.6.1
~> echo $TERM
alacritty
# OS is Manjaro with with i3 window manager.

Tried running with sh -c 'env HOME=$(mktemp -d) XDG_CONFIG_HOME= fish' - produces the same behavior.

When in background, commandline "<cmd>" inside a function that handles signals doesn't actually insert text into the prompt.

Let's open two terminals:

# in the first one
function testfunc --on-signal SIGUSR1
   commandline -r "ls -la"
end
echo $fish_pid # xxxx

# in the second one
kill -SIGUSR1 xxxx

Produces no commands inserted into the first terminal. However, when sending the signal from the first terminal to itself, everything works as expected.
Furthermore, commandline -f execute would insert a newline as expected, and eval "ls -la" works as well.

@zanchey zanchey added the bug Something that's not working as intended label Nov 29, 2023
@zanchey zanchey added this to the fish-future milestone Nov 29, 2023
@zanchey
Copy link
Member

zanchey commented Nov 29, 2023

The only other version I have to hand is 3.0.2, where this works as expected. It's broken in 3.6.1 and in HEAD.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that's not working as intended
Projects
None yet
Development

No branches or pull requests

2 participants