mirror of
https://github.com/jimeh/tmuxifier.git
synced 2026-02-19 01:46:40 +00:00
16
README.md
16
README.md
@@ -202,6 +202,22 @@ any reason you need to disable it, just set `$TMUXIFIER_NO_COMPLETE`.
|
||||
export TMUXIFIER_NO_COMPLETE=1
|
||||
```
|
||||
|
||||
## Tips
|
||||
|
||||
### iTerm2 Integration
|
||||
|
||||
Tmuxifier supports iTerm2's [Tmux integration][]. It can be used in two ways:
|
||||
|
||||
- Passing `-CC` as a second argument to the `load-session` command. For
|
||||
example:
|
||||
|
||||
tmuxifier load-session my-awesome-session -CC
|
||||
|
||||
- Setting the `TMUXIFIER_TMUX_ITERM_ATTACH` environment variable to `-CC`
|
||||
before calling the `load-session` command.
|
||||
|
||||
[tmux integration]: https://code.google.com/p/iterm2/wiki/TmuxIntegration
|
||||
|
||||
## Inspiration
|
||||
|
||||
- Tmuxifier is largely inspired by [Tmuxinator][].
|
||||
|
||||
@@ -323,7 +323,8 @@ __get_current_window_index() {
|
||||
|
||||
__go_to_session() {
|
||||
if [ -z "$TMUX" ]; then
|
||||
tmuxifier-tmux -u attach-session -t "$session:"
|
||||
tmuxifier-tmux $TMUXIFIER_TMUX_ITERM_ATTACH -u \
|
||||
attach-session -t "$session:"
|
||||
else
|
||||
tmuxifier-tmux -u switch-client -t "$session:"
|
||||
fi
|
||||
|
||||
@@ -7,7 +7,7 @@ source "$TMUXIFIER/lib/util.sh"
|
||||
|
||||
# Provide tmuxifier help
|
||||
if calling-help "$@"; then
|
||||
echo "usage: tmuxifier load-session <layout_name | file_path>
|
||||
echo "usage: tmuxifier load-session <layout_name | file_path> [<iterm mode>]
|
||||
|
||||
Aliases: session, ses, s
|
||||
|
||||
@@ -30,5 +30,9 @@ fi
|
||||
# Load runtime functions.
|
||||
source "$TMUXIFIER/lib/runtime.sh"
|
||||
|
||||
if [ "$2" == "-CC" ]; then
|
||||
export TMUXIFIER_TMUX_ITERM_ATTACH="-CC"
|
||||
fi
|
||||
|
||||
# Load session file.
|
||||
load_session "$1"
|
||||
|
||||
Reference in New Issue
Block a user