Skip to content

Commit

Permalink
Ignore startup_session when kitty is invoked with command line option…
Browse files Browse the repository at this point in the history
…s specifying a command to run
  • Loading branch information
kovidgoyal committed Mar 10, 2024
1 parent fccf8db commit 88b7595
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ Detailed list of changes

- Keyboard protocol: Do not deliver a fake key release events on OS window focus out for engaged modifiers (:iss:`7196`)

- Ignore :opt:`startup_session` when kitty is invoked with command line options specifying a command to run (:pull:`7198`)

0.32.2 [2024-02-12]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
4 changes: 2 additions & 2 deletions kitty/options/definition.py
Original file line number Diff line number Diff line change
Expand Up @@ -3057,8 +3057,8 @@
instances. See :ref:`sessions` in the kitty documentation for details. Note that
relative paths are interpreted with respect to the kitty config directory.
Environment variables in the path are expanded. Changing this option by
reloading the config is not supported. Note that this prevents kitty from processing
any command line arguments as a program to run.
reloading the config is not supported. Note that if kitty is invoked with command line
arguments specifying a command to run, this option is ignored.
'''
)

Expand Down
2 changes: 1 addition & 1 deletion kitty/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def create_sessions(
session_data = f.read()
yield from parse_session(session_data, opts, environ=environ)
return
if default_session and default_session != 'none':
if default_session and default_session != 'none' and not getattr(args, 'args', None):
try:
with open(default_session) as f:
session_data = f.read()
Expand Down

0 comments on commit 88b7595

Please sign in to comment.