Hot answers tagged

8

On your system, once sudo has authenticated you, the authentication is tied to the particular TTY that you ran sudo from. Each pane in tmux has its own TTY. sudo on your system uses the tty_ticket option by default, or it uses timestamp_type=tty (possibly not explicitly as it is the default). These settings are documented in the sudoers manual: ...


3

The new-session and split-plane commands in tmux takes a command to run in the new pane. If you have a list of user@server strings in an array, you could do this: #!/bin/bash ssh_list=( user1@server1 user2@server2 ... ) split_list=() for ssh_entry in "${ssh_list[@]:1}"; do split_list+=( split-pane ssh "$ssh_entry" ';' ) done tmux new-session ssh "${...


2

Nice idea. I'd create a wrapper, say /bin/my-screen that would look like this: #!/usr/bin/env sh screen -d -RR Make it executable and add it to /etc/shells: echo /bin/my-screen | sudo tee -a /etc/shells Make it the default shell: chsh --shell /bin/my-screen Notice that some terminal emulators such as xterm do not run shell defined in /etc/passwd by ...


2

You can set the cursor style to reflect the mode by setting these in your .inputrc: set editing-mode vi set show-mode-in-prompt on set vi-ins-mode-string \1\e[6 q\2 set vi-cmd-mode-string \1\e[2 q\2 # optionally: # switch to block cursor before executing a command set keymap vi-insert RETURN: "\e\n" This will give you a beam cursor in insert mode or a ...


1

There is no inbuilt method to show copy mode commands, they are in the manual.


1

I found this: set-option -g prefix2 C-a Here: https://stackoverflow.com/questions/10148449/multiple-tmux-prefix-key-combos


1

fzf-complete-from-tmux.sh #!/bin/bash tmux capture-pane -pS -100000 | # Dump the tmux buffer. tac | # Reverse so duplicates use the first match. pcregrep -o "[\w\d_\-\.\/]+" | # Extract the words. awk '{ if (!seen[$0]++) print }' | # De-duplicate them with awk, then pass to fzf. fzf --no-sort --exact +i ...


Only top voted, non community-wiki answers of a minimum length are eligible