mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-05 00:01:15 -03:00
bg: deduplicate job argument
"bg %1" of a pipline prints the same line twice because it tries to background the same job twice. This doesn't make sense and other builtins like "disown" already deduplicate, so do the same. Unfortunately we can't use the same approach as "disown" because we can't hold on to references to job, since we're modifying the job list.
This commit is contained in:
@@ -17,3 +17,11 @@ isolated-tmux capture-pane -p
|
||||
# CHECK: fish: Job 1, 'sleep 0.5 &' has ended
|
||||
# (I've seen this print " world", I guess it depends on tmux version and how big it thinks the terminal is)
|
||||
# CHECK: {{.*}} world
|
||||
|
||||
isolated-tmux send-keys C-u C-l "sleep 3 | cat &" Enter "bg %1" Enter
|
||||
tmux-sleep
|
||||
isolated-tmux capture-pane -p | string match -v '*has stopped*'
|
||||
# CHECK: prompt 0> sleep 3 | cat &
|
||||
# CHECK: prompt 0> bg %1
|
||||
# CHECK: Send job 1 'sleep 3 | cat &' to background
|
||||
# CHECK: prompt 1>
|
||||
|
||||
Reference in New Issue
Block a user