mirror of
				https://github.com/dcarrillo/prezto.git
				synced 2025-11-04 12:09:08 +00:00 
			
		
		
		
	Compare commits
	
		
			1 Commits
		
	
	
		
			pull/651-g
			...
			pull/582-t
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					5e6adf89b9 | 
@@ -55,8 +55,6 @@ alias gcr='git revert'
 | 
			
		||||
alias gcR='git reset "HEAD^"'
 | 
			
		||||
alias gcs='git show'
 | 
			
		||||
alias gcl='git-commit-lost'
 | 
			
		||||
alias gcS='git commit -S'
 | 
			
		||||
alias gpS='git show --pretty=short --show-signature'
 | 
			
		||||
 | 
			
		||||
# Conflict (C)
 | 
			
		||||
alias gCl='git status | sed -n "s/^.*both [a-z]*ed: *//p"'
 | 
			
		||||
@@ -109,7 +107,6 @@ alias glo='git log --topo-order --pretty=format:${_git_log_oneline_format}'
 | 
			
		||||
alias glg='git log --topo-order --all --graph --pretty=format:${_git_log_oneline_format}'
 | 
			
		||||
alias glb='git log --topo-order --pretty=format:${_git_log_brief_format}'
 | 
			
		||||
alias glc='git shortlog --summary --numbered'
 | 
			
		||||
alias glS='git log --show-signature'
 | 
			
		||||
 | 
			
		||||
# Merge (m)
 | 
			
		||||
alias gm='git merge'
 | 
			
		||||
@@ -171,10 +168,6 @@ alias gSs='git submodule sync'
 | 
			
		||||
alias gSu='git submodule foreach git pull origin master'
 | 
			
		||||
alias gSx='git-submodule-remove'
 | 
			
		||||
 | 
			
		||||
# Tag (t)
 | 
			
		||||
alias gts='git tag -s'
 | 
			
		||||
alias gtv='git verify-tag'
 | 
			
		||||
 | 
			
		||||
# Working Copy (w)
 | 
			
		||||
alias gws='git status --ignore-submodules=${_git_status_ignore_submodules} --short'
 | 
			
		||||
alias gwS='git status --ignore-submodules=${_git_status_ignore_submodules}'
 | 
			
		||||
 
 | 
			
		||||
@@ -20,15 +20,25 @@ following line to *zpreztorc*:
 | 
			
		||||
 | 
			
		||||
    zstyle ':prezto:module:tmux:auto-start' remote 'yes'
 | 
			
		||||
 | 
			
		||||
In both cases, it will create a background session named _prezto_ if the tmux
 | 
			
		||||
server is not started.
 | 
			
		||||
In both cases the tmux server will be started and a background session
 | 
			
		||||
named _prezto_ will be created if a session doesn't already exist.
 | 
			
		||||
 | 
			
		||||
With `auto-start` enabled, you may want to control how multiple sessions are
 | 
			
		||||
managed. The `destroy-unattached` option of tmux controls if the unattached
 | 
			
		||||
sessions must be kept alive, making sessions available for later use, configured
 | 
			
		||||
in *tmux.conf*:
 | 
			
		||||
By default every shell shares a set of windows but has an independent
 | 
			
		||||
view. Detaching from one of these sessions removes the view but the
 | 
			
		||||
open windows persist. This is accomplished by setting the
 | 
			
		||||
`destroy-unattached` option to `on` for each session.
 | 
			
		||||
 | 
			
		||||
Some users prefer that all new shells share the same session so that
 | 
			
		||||
the view for each shell is in sync. This useful for advanced users
 | 
			
		||||
that create multiple sessions and want to manually navigate between
 | 
			
		||||
them. To accomplish this behavior set the `mode` option to `shared` in
 | 
			
		||||
*zpreztorc*,
 | 
			
		||||
 | 
			
		||||
    zstyle ':prezto:module:tmux:auto-start' mode shared
 | 
			
		||||
 | 
			
		||||
You can customize the background session by creating a new session in
 | 
			
		||||
your `.tmux.conf` file.
 | 
			
		||||
 | 
			
		||||
    set-option -g destroy-unattached [on | off]
 | 
			
		||||
 | 
			
		||||
Aliases
 | 
			
		||||
-------
 | 
			
		||||
 
 | 
			
		||||
@@ -25,14 +25,21 @@ if [[ -z "$TMUX" && -z "$EMACS" && -z "$VIM" ]] && ( \
 | 
			
		||||
 | 
			
		||||
  # Create a 'prezto' session if no session has been defined in tmux.conf.
 | 
			
		||||
  if ! tmux has-session 2> /dev/null; then
 | 
			
		||||
    tmux_session='prezto'
 | 
			
		||||
    tmux \
 | 
			
		||||
      new-session -d -s "$tmux_session" \; \
 | 
			
		||||
      set-option -t "$tmux_session" destroy-unattached off &> /dev/null
 | 
			
		||||
      new-session -d -s prezto \; \
 | 
			
		||||
      set-option -t prezto destroy-unattached off &> /dev/null
 | 
			
		||||
  else
 | 
			
		||||
    tmux_session
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  if zstyle -t ':prezto:module:tmux:auto-start' mode shared; then
 | 
			
		||||
      # Attach to the 'prezto' session or to the last session used.
 | 
			
		||||
  exec tmux attach-session
 | 
			
		||||
      exec tmux attach
 | 
			
		||||
  else
 | 
			
		||||
      # Find a session to share windows with.
 | 
			
		||||
      tmux_session=`tmux list-sessions -F '#S' | head -n 1`
 | 
			
		||||
      exec tmux new-session -t "$tmux_session"\; set-option destroy-unattached on
 | 
			
		||||
  fi
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user