elementary / terminal

Terminal emulator designed for elementary OS
https://elementary.io
GNU Lesser General Public License v3.0
413 stars 97 forks source link

-t opens two tabs when no windows are open #498

Open GammaGames opened 4 years ago

GammaGames commented 4 years ago

Using the command io.elementary.terminal -t opens two tabs if non are currently open.

To Reproduce

  1. Add custom keyboard shortcut for io.elementary.terminal -t in the settings app
  2. Close all terminal windows
  3. Press shortcut
  4. Notice there are two tabs

Expected behavior

If there is currently no open terminal, it should just create the single window with the single tab

Screenshots or screen recordings

Screen record from 2020-04-03 11 35 47

Platform Information

image

x I'm using the latest released stable version

GammaGames commented 4 years ago

Maybe related to #356 too, but different in that right clicking a folder and opening it in terminal opens one tab in your home directory and the second tab in the target directory.

t0suj4 commented 3 years ago

The same problem appears when open with --new-window and --execute=<command>

jeremypw commented 3 years ago

On elementary 6.0 I am getting two extra tabs :disappointed: when io.elementary.terminal -t is launched with a custom shortcut. But only one extra tab when launched from the commandline (of a different app).

jeremypw commented 3 years ago

This may be the result of a recent commit #478

jeremypw commented 3 years ago

Weirdly, launching e.g. io.elementary.terminal -w ~/Documents with a custom shortcut also opens three tabs - all at ~ not ~/Documents. Launching the same command from e.g. xterm opens a single tab at ~/Documents as expected.

So there seems something amiss with the way custom shortcuts work with Terminal.