New answers tagged

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 ...


0

The following happens to me after starting a Tmux session (without conda having any active env). When I first do inside the Tmux session: conda activate myEnv I get CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'. To initialize your shell, run $ conda init <SHELL_NAME> Currently supported shells are: ...


-1

I suspect that you had some tmux windows open, in which case it would have used the old configuration. you have two options: 1. before starting a tmux session, source the config ~source ~/.tmux.conf~ shut down all tmux windows and start a new session


0

I am not a tmux expert, but perhaps you could improve on this idea: split the pane in two side-by-side and show a list of decreasing numbers in the new pane which ends at 0 for the lowest line. For example, in your ~/.tmux.conf set a binding for character = bind-key -T copy-mode-vi = split-window -h -p 90 'seq 24 -1 1;sleep 15'\; swap-pane -dU Then in vi ...


1

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


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 "${...


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 ...


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 ...


0

You can add set show-mode-in-prompt on to the readline configuration (~/.inputrc or /etc/inputrc) If you want to toggle it directly in the shell you can do so via the bind built-in command: bind 'set show-mode-in-prompt on' bind 'set show-mode-in-prompt off' See the related Spurious @ symbol at start of bash prompt in Debian Jessie


0

Your quoting is (possibly) messed up. Possibly, because your command does seem to work for me. Instead of sending literal single quotes, just make sure that the command is quoted: _SNAME="$1-$2" TERM=xterm ssh -t x.y.z.com tmux new-session -A -s "$_SNAME" "ssh $1" What is probably happening for you is that the command 'ssh can't be found. You could also ...


1

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


Top 50 recent answers are included