Open ReiFan49 opened 2 years ago
Hey. Can you provide more details on the expected behavior? I'm not sure I understand the issue. Also, what do you mean by smug config
? There is no such command.
Hey. Can you provide more details on the expected behavior? I'm not sure I understand the issue. Also, what do you mean by
smug config
? There is no such command.
He mean smug list
might be typo
It seems I have the same problem, so I can try to explain it in a simple way. Let's say that we have two configuration files like these:
$cat aaa.yml
session: testa
root: ~/
windows:
- name: test
commands:
- true
$cat bbb.yml
session: test
root: ~/
windows:
- name: test
commands:
- true
$
If I start in this order
$smug start aaa
Starting a new session...
[detached (from session testa)]
$smug start bbb
Starting a new session...
[detached (from session testa)]
$
only aaa will start.
$
$tmux ls
testa: 1 windows (created Tue Jan 30 07:42:31 2024)
$
On the other hand, if I start in this order
$
$smug start bbb
Starting a new session...
[detached (from session test)]
$smug start aaa
Starting a new session...
[detached (from session testa)]
$
both will start.
$
$tmux ls
test: 1 windows (created Tue Jan 30 07:47:15 2024)
testa: 1 windows (created Tue Jan 30 07:47:23 2024)
$
I have done some testing and it seems to be related to the session names. In this case test
matches the beginning, or prefix, of testa
.
I hope this clarifies the problem.
Describe the bug If there are two or more smug config with name prefixed from one of them, and then the prefix of the name itself is running last (as it uses
$(smug config)
To get the situation here:
smug config
will give you a list, with prefixer to come later from prefixed name.for VAR in $(smug config)
will execute everything except the last one, due to prefixing issue. On the picture it'syohane-irc
vsyohane
which is shadowed byyohane-irc
upon doingsmug start yohane
until theyohane-irc
window got stopped.However:
smug config | sort
, or at least sorting the naming order fromsmug config
output, which happens to give different output from justsmug config
. Things works normally.yohane
toyohane-irc
instead vice versa. No naming conflict like what happened above.Smug config smug config does not matter
Expected behavior
yohane-irc
andyohane
should be executed alongside in any order of execution.Output of
cat ~/.config/smug/smug.log
output log does not matter.Smug version
0.2.7
OS you're using Linux