Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Post History
In tmux I have the following command in my .tmux.conf, which will save a double-clicked line to the file /tmp/tmux_line.txt: bind-key -n DoubleClick1Pane select-pane \; copy-mode -M \; send-keys -...
Question
tmux
#1: Initial revision
how to save the line number of a double-clicked line in tmux
In tmux I have the following command in my `.tmux.conf`, which will save a double-clicked line to the file `/tmp/tmux_line.txt`: ```tmux bind-key -n DoubleClick1Pane select-pane \; copy-mode -M \; send-keys -X select-line \; send-keys -X copy-pipe-and-cancel "cat > /tmp/tmux_line.txt" ``` Is there a way to modify this command to save the *line number* instead of (or in addition to) the line itself? I know that tmux keeps track of line numbers as it has commands such as `goto-line` in copy mode. I looked through the tmux manual, but I can't figure it out.