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
As per the title, thanks.
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
Hi everyone!
There is an error on the page 71 in the book “Programming machine learning from coding to depp learning” P. Perrotta. You c...
New
Title: Web Development with Clojure, Third Edition, vB17.0 (p9)
The create table guestbook syntax suggested doesn’t seem to be accepted ...
New
I’m new to Rust and am using this book to learn more as well as to feed my interest in game dev. I’ve just finished the flappy dragon exa...
New
The markup used to display the uploaded image results in a Phoenix.LiveView.HTMLTokenizer.ParseError error.
lib/pento_web/live/product_l...
New
Hi,
I am getting an error I cannot figure out on my test.
I have what I think is the exact code from the book, other than I changed “us...
New
root_layout: {PentoWeb.LayoutView, :root},
This results in the following following error:
no “root” html template defined for PentoWeb...
New
Getting an error when installing the dependencies at the start of this chapter:
could not compile dependency :exla, "mix compile" failed...
New
I just bought this book to learn about Android development, and I’m already running into a major issue in Ch. 1, p. 20: “Update activity...
New
Other popular topics
If it’s a mechanical keyboard, which switches do you have?
Would you recommend it? Why?
What will your next keyboard be?
Pics always w...
New
Algorithms and data structures are much more than abstract concepts. Mastering them enables you to write code that runs faster and more e...
New
Which, if any, games do you play? On what platform?
I just bought (and completed) Minecraft Dungeons for my Nintendo Switch. Other than ...
New
@AstonJ prompted me to open this topic after I mentioned in the lockdown thread how I started to do a lot more for my fitness.
https://f...
New
Do the test and post your score :nerd_face:
:keyboard:
If possible, please add info such as the keyboard you’re using, the layout (Qw...
New
Tailwind CSS is an exciting new CSS framework that allows you to design your site by composing simple utility classes to create complex e...
New
Oh just spent so much time on this to discover now that RancherOS is in end of life but Rancher is refusing to mark the Github repo as su...
New
Rails 7 completely redefines what it means to produce fantastic user experiences and provides a way to achieve all the benefits of single...
New
Author Spotlight
Jamis Buck
@jamis
This month, we have the pleasure of spotlighting author Jamis Buck, who has written Mazes for Prog...
New
Hair Salon Games for Girls Fun
Girls Hair Saloon game is mainly developed for kids. This game allows users to select virtual avatars to ...
New
Categories:
Sub Categories:
Popular Portals
- /elixir
- /rust
- /ruby
- /wasm
- /erlang
- /phoenix
- /keyboards
- /python
- /rails
- /js
- /security
- /go
- /swift
- /vim
- /clojure
- /emacs
- /haskell
- /java
- /svelte
- /onivim
- /typescript
- /kotlin
- /crystal
- /c-plus-plus
- /tailwind
- /react
- /gleam
- /ocaml
- /elm
- /flutter
- /vscode
- /ash
- /opensuse
- /html
- /centos
- /php
- /zig
- /deepseek
- /scala
- /sublime-text
- /lisp
- /textmate
- /react-native
- /nixos
- /debian
- /agda
- /kubuntu
- /arch-linux
- /django
- /deno
- /revery
- /ubuntu
- /nodejs
- /manjaro
- /spring
- /diversity
- /lua
- /julia
- /c
- /slackware







