Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Sources/CopyCat/Broadcast.swift
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,9 @@ enum Broadcast {
)
}

// Remote home dir is unknown, so always tilde-prefix.
let typed = "~/\(remoteCacheRel)/\(outName)"
// Remote home dir is unknown, so always tilde-prefix. Trailing space
// matches the local-paste path so the user can keep typing.
let typed = "~/\(remoteCacheRel)/\(outName) "
DispatchQueue.main.async {
Typer.type(typed)
}
Expand Down
6 changes: 5 additions & 1 deletion Sources/CopyCat/ImagePaste.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ enum ImagePaste {
// IDE, …) — unlike `~/`, which only expands inside a shell. The
// user-visible cosmetic cost is /Users/you/… instead of ~/…, which
// is fine: this terminal already knows who you are.
let typed = outPath.path
// Trailing space so the user can keep typing the next argument without
// hitting space themselves. The typed path has no spaces, so the only
// way this corrupts a command is pasting inside quotes — uncommon for
// this workflow.
let typed = outPath.path + " "
DispatchQueue.main.async {
Typer.type(typed)
}
Expand Down
Loading