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
Python Testing With Pytest - Chapter 2, warnings for “unregistered custom marks”
While running the smoke tests in Chapter 2, I get these...
New
Title: Web Development with Clojure, Third Edition, pg 116
Hi - I just started chapter 5 and I am stuck on page 116 while trying to star...
New
The following is cross-posted from the original Ray Tracer Challenge forum, from a post by garfieldnate. I’m cross-posting it so that the...
New
Title: Hands-On Rust (Chap 8 (Adding a Heads Up Display)
It looks like
.with_simple_console_no_bg(SCREEN_WIDTH*2, SCREEN_HEIGHT*2...
New
Hello! On page xix of the preface, it says there is a community forum "… for help if your’re stuck on one of the exercises in this book… ...
New
Page 28: It implements io.ReaderAt on the store type.
Sorry if it’s a dumb question but was the io.ReaderAt supposed to be io.ReadAt?
...
New
I ran this command after installing the sample application:
$ cards add do something --owner Brian
And got a file not found error:
Fil...
New
The markup used to display the uploaded image results in a Phoenix.LiveView.HTMLTokenizer.ParseError error.
lib/pento_web/live/product_l...
New
I’m a newbie to Rails 7 and have hit an issue with the bin/Dev script mentioned on pages 112-113.
Iteration A1 - Seeing the list of prod...
New
Modern front-end development for Rails, second edition - Struggling to get the first chapter to work
After running /bin/setup, the first error was: The foreman' command exists in these Ruby versions: That was easy to fix: gem install fore...
New
Other popular topics
Hello Devtalk World!
Please let us know a little about who you are and where you’re from :nerd_face:
New
SpaceVim seems to be gaining in features and popularity and I just wondered how it compares with SpaceMacs in 2020 - anyone have any thou...
New
Just done a fresh install of macOS Big Sur and on installing Erlang I am getting:
asdf install erlang 23.1.2
Configure failed.
checking ...
New
Hello everyone! This thread is to tell you about what authors from The Pragmatic Bookshelf are writing on Medium.
New
Create efficient, elegant software tests in pytest, Python's most powerful testing framework.
Brian Okken @brianokken
Edited by Kat...
New
Hi folks,
I don’t know if I saw this here but, here’s a new programming language, called Roc
Reminds me a bit of Elm and thus Haskell. ...
New
Build efficient applications that exploit the unique benefits of a pure functional language, learning from an engineer who uses Haskell t...
New
Author Spotlight
Mike Riley
@mriley
This month, we turn the spotlight on Mike Riley, author of Portable Python Projects. Mike’s book ...
New
Inside our android webview app, we are trying to paste the copied content from another app eg (notes) using navigator.clipboard.readtext ...
New
Will Swifties’ war on AI fakes spark a deepfake porn reckoning?
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
- /html
- /opensuse
- /centos
- /php
- /zig
- /deepseek
- /scala
- /sublime-text
- /textmate
- /lisp
- /react-native
- /nixos
- /debian
- /agda
- /kubuntu
- /arch-linux
- /deno
- /django
- /revery
- /ubuntu
- /nodejs
- /spring
- /manjaro
- /diversity
- /lua
- /julia
- /c
- /slackware







