From 7861cbdd09334ae317b43354375daf289f0b87fd Mon Sep 17 00:00:00 2001 From: Antoine Lhermitte Date: Tue, 1 Dec 2020 13:26:27 +0100 Subject: [PATCH] Add shell_tools.md to the git repo. This file aims at bringing together my most useful commands and key bindings. This version has tmux section filled in and the title for some other sections --- shell_tools | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 shell_tools diff --git a/shell_tools b/shell_tools new file mode 100644 index 0000000..cd0943f --- /dev/null +++ b/shell_tools @@ -0,0 +1,76 @@ +The purpose of this document is serve as a repository of the Unix shell commands and key bindings that either are the most useful or that I use the most. + +# tmux +## Sessions +Start new session named *name* +`tmux new -s name` + +Attach latest session +`tmux a` + +Attach to session named *name* +`tmux a -t name` + +Detach from session +Ctrl+b,d + +List all sessions +`tmux ls` +Ctrl+b,s + +Rename current session +`tmux rename-session newname` +Ctrl+b,$ + +Kill session named *name* +`tmux kill-ses -t name` +Kill all sessions except the current +`tmux kill-ses -a` + +## Windows + +Create new window +Ctrl+b,c + +Rename current window +Ctrl+b,, + +Next window +Ctrl+b,n + +Previous window +Ctrl+b,p + +Select window by number +Ctrl+b,0...9 + +Close window +Ctrl+b,& + +## Panes + +Split pane vertically +Ctrl+b,% + +Split pane horizontally +Ctrl+b," + +Toggle last active pane +Ctrl+b,; + +Switch pane to the direction +Ctrl+b, +Ctrl+b, +Ctrl+b, +Ctrl+b, + +Convert pane into a new window +Ctrl+b,! + +Close current pane +Ctrl+b,x + +# git +# docker +# weechat +