You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying zellij action go-to-tab-name xyz the exit value of the command is 0 (zero), independent of whether a tab with name xyz already exists or not.
If a tab with that name doesn't exist, you stay in the current tab, and an error, i.e. non-zero, exit value should be used, on which the calling script/program can act.
Always using --create for the action is not an option (in my use case), as I need different script behaviour depending on whether the tab is there or not (i.e. switch to the tab, do A if not failing; and if failing do create the tab and then B).
You can work around this by parsing the output of zellij action query-tab-names before issuing the go-to-tab action (with or without --create, but using a differentiating exit value is easier in almost all (scripting) languages and shells.
The text was updated successfully, but these errors were encountered:
When trying
zellij action go-to-tab-name xyz
the exit value of the command is 0 (zero), independent of whether a tab with namexyz
already exists or not.If a tab with that name doesn't exist, you stay in the current tab, and an error, i.e. non-zero, exit value should be used, on which the calling script/program can act.
Always using
--create
for the action is not an option (in my use case), as I need different script behaviour depending on whether the tab is there or not (i.e. switch to the tab, do A if not failing; and if failing do create the tab and then B).You can work around this by parsing the output of
zellij action query-tab-names
before issuing thego-to-tab
action (with or without--create
, but using a differentiating exit value is easier in almost all (scripting) languages and shells.The text was updated successfully, but these errors were encountered: