
stevenfalco
Tmux 3: paste-command not recognized (pg 59)
I am attempting to use the commands at the top of page 59 of the beta 3.0 version of the tmux 3 book.
I get an error on this line:
set -g paste-command "xclip -sel clip -o"'
The error message is:
invalid option: paste-command
I looked at the manual page and while the copy-command
is listed, there is no listing for the paste-command
so it appears that that command doesn’t exist.
I am using Fedora 41 which provides tmux version 3.5a. I think that is the most recent version of tmux.
Please let me know if there is a revised command that takes the place of paste-command
.
Marked As Solved

bphogan
Author of Build Websites with Hugo (and 4 other titles)
Hi @stevenfalco. Thanks for raising this. It looks like I goofed and an old version of the file made its way into the book.
It’s supposed to use @ variables, not the commands themselves.
Does this work for you?
# Detect the display server protocol and set clipboard commands
if-shell '[ "$XDG_SESSION_TYPE" = "wayland" ]' \
'set -g @copy_command "wl-copy"; \
set -g @paste_command "wl-paste -n"' \
'set -g @copy_command "xclip -sel clip -i"; \
set -g @paste_command "xclip -sel clip -o"'
# Prefix Ctrl-C takes what's in the buffer and sends it to system clipboard
# via the command stored in the variable.
bind C-c run-shell 'tmux save-buffer - | #{@copy_command}'
# y in copy mode takes selection and sends it to system clipboard via the
# command stored in the variable.
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "#{@copy_command}"
# Prefix Ctrl-v fills tmux buffer from system clipboard, then
# pastes from buffer into tmux window
bind C-v run-shell '#{@paste_command} | tmux load-buffer - \; paste-buffer'
Also Liked

stevenfalco
Yes - that version works.
Thanks!
1
Popular Pragmatic Bookshelf topics

Some minor things in the paper edition that says “3 2020” on the title page verso, not mentioned in the book’s errata online:
p. 186 But...
New

Following the steps described in Chapter 6 of the book, I’m stuck with running the migration as described on page 84:
bundle exec sequel...
New

Many tasks_proj/tests directories exist in chapters 2, 3, 5 that have tests that use the custom markers smoke and get, which are not decl...
New

Title: Web Development with Clojure, Third Edition - migrations/create not working: p159
When I execute the command:
user=> (create-...
New

I can’t setup the Rails source code. This happens in a working directory containing multiple (postgres) Rails apps.
With:
ruby-3.0.0
s...
New

In case this helps anyone, I’ve had issues setting up the rails source code. Here were the solutions:
In Gemfile, change
gem 'rails'
t...
New

In general, the book isn’t yet updated for Phoenix version 1.6. On page 18 of the book, the authors indicate that an auto generated of ro...
New

Hey there,
I’m enjoying this book and have learned a few things alredayd. However, in Chapter 4 I believe we are meant to see the “>...
New

Modern Front-End Development for Rails - application does not start after run bin/setup (page xviii)
After some hassle, I was able to finally run bin/setup, now I have started the rails server but I get this error message right when I vis...
New

@mfazio23
I’m following the indications of the book and arriver ad chapter 10, but the app cannot be compiled due to an error in the Bas...
New
Other popular topics

I’m thinking of buying a monitor that I can rotate to use as a vertical monitor?
Also, I want to know if someone is using it for program...
New

If you are experiencing Rails console using 100% CPU on your dev machine, then updating your development and test gems might fix the issu...
New

Learn different ways of writing concurrent code in Elixir and increase your application's performance, without sacrificing scalability or...
New

The V Programming Language
Simple language for building maintainable programs
V is already mentioned couple of times in the forum, but I...
New

Think Again 50% Off Sale »
The theme of this sale is new perspectives on familiar topics.
Enter coupon code ThinkAgain2021 at checkout t...
New

If you get Can't find emacs in your PATH when trying to install Doom Emacs on your Mac you… just… need to install Emacs first! :lol:
bre...
New

The overengineered Solution to my Pigeon Problem.
TL;DR: I built a wifi-equipped water gun to shoot the pigeons on my balcony, controlle...
New

Author Spotlight:
David Bryant Copeland
@davetron5000
We’re so happy to bring you another Author Spotlight, a series where we sit dow...
New

Author Spotlight:
Peter Ullrich
@PJUllrich
Data is at the core of every business, but it is useless if nobody can access and analyze ...
New

Author Spotlight:
Sophie DeBenedetto
@SophieDeBenedetto
The days of the traditional request-response web application are long gone, b...
New
Categories:
Sub Categories:
Popular Portals
- /elixir
- /rust
- /wasm
- /ruby
- /erlang
- /phoenix
- /keyboards
- /rails
- /js
- /python
- /security
- /go
- /swift
- /vim
- /clojure
- /java
- /haskell
- /emacs
- /svelte
- /onivim
- /typescript
- /crystal
- /c-plus-plus
- /tailwind
- /kotlin
- /gleam
- /react
- /flutter
- /elm
- /ocaml
- /ash
- /vscode
- /opensuse
- /centos
- /php
- /deepseek
- /scala
- /html
- /zig
- /debian
- /nixos
- /lisp
- /agda
- /textmate
- /sublime-text
- /react-native
- /kubuntu
- /arch-linux
- /revery
- /ubuntu
- /manjaro
- /django
- /spring
- /diversity
- /lua
- /nodejs
- /julia
- /slackware
- /c
- /neovim