Skip to content

Files with spaces in path paste incorrectly #10054

Description

@tunnels-end

Describe the bug
I am on MacOS. When dragging a file from Finder with spaces in its path, every space is replaced with the string %20 in the text that appears in kitty.

To Reproduce
Steps to reproduce the behavior:

  1. Pick a file whose path contains a space
  2. Select it in Finder and drag it to Kitty
  3. See error

Screenshots
If applicable, add screenshots to help explain your problem.

Image Image

Environment details

kitty 0.47.0 (eadec09d49) created by Kovid Goyal
Darwin Mac 25.5.0 Darwin Kernel Version 25.5.0: Mon Apr 27 20:41:26 PDT 2026; root:xnu-12377.121.6~2/RELEASE_ARM64_T8132 arm64
ProductName:		macOS ProductVersion:		26.5 BuildVersion:		25F71
OpenGL: '4.1 Metal - 90.5' Detected version: 4.1
Frozen: True
Fonts:
  medium: Monaco: /System/Library/Fonts/Monaco.ttf
          Features: ()
    bold: Monaco: /System/Library/Fonts/Monaco.ttf
          Features: ()
  italic: Monaco: /System/Library/Fonts/Monaco.ttf
          Features: ()
      bi: Monaco: /System/Library/Fonts/Monaco.ttf
          Features: ()
Paths:
  kitty: /Applications/kitty.app/Contents/MacOS/kitty
  base dir: /Applications/kitty.app/Contents/Resources/kitty
  extensions dir: /Applications/kitty.app/Contents/Resources/Python/lib/kitty-extensions
  system shell: /bin/zsh
System color scheme: light. Applied color theme type: none
Loaded config files:
  /Users/redacted/.config/kitty/kitty.conf

Config options different from defaults:
background_image_layout cscaled
background_tint         0.6
editor                  ~/.nix-profile/bin/vim
font_family             family=Monaco postscript_name=Monaco
macos_option_as_alt     2
remember_window_size    False
shell                   /Users/redacted/.nix-profile/bin/fish
Added shortcuts:
	shift+cmd+t →  new_tab_with_cwd
Changed shortcuts:
	cmd+k →  clear_terminal_and_scrollback
	cmd+l →  clear_last_command
	ctrl+cmd+, →  reload_config
	ctrl+cmd+l →  clear_screen
	opt+cmd+k →  clear_scrollback
	opt+cmd+r →  reset_terminal
	shift+cmd+/ →  open_kitty_website
Colors:
	background              #222d31   
	color0                  #222d31   
	color1                  #ab4642   
	color10                 #8d8f8d   
	color11                 #f7ca88   
	color12                 #7cafc2   
	color13                 #ba8baf   
	color14                 #1abb9b   
	color15                 #f8f8f8   
	color2                  #7e807e   
	color3                  #f7ca88   
	color4                  #7cafc2   
	color5                  #ba8baf   
	color6                  #1abb9b   
	color7                  #d8d8d8   
	color8                  #585858   
	color9                  #ab4642   
	foreground              #d8d8d8   
	macos_titlebar_color    background
	selection_background    #2b2c2b   
	selection_foreground    #16a085   

Important environment variables seen by the kitty process:
	PATH                                /Applications/kitty.app/Contents/MacOS:/usr/bin:/bin:/usr/sbin:/sbin
	LANG                                en_US.UTF-8
	SHELL                               /bin/zsh
	DISPLAY                             /var/run/com.apple.launchd.IwJ1SAJNMQ/org.xquartz:0
	USER                                redacted

Additional context
The behavior persists with kitty --config NONE, and I have tried adjusting paste_action to no avail. Using nightly or a different shell (system bash, nix zsh) does not change behavior either.

I expect this is an IBM/PEBKAC error, particularly since I'm not finding any other issues to this effect and #613 seems to indicate dragging has treated spaces as spaces for quite some time. But if it is and anyone can point me in the direction of what to do, I'd greatly appreciate it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions