mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-12 05:49:47 +08:00
Compare commits
2 Commits
0dc40e88a3
...
2b1303a728
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2b1303a728 | ||
|
|
1f56f2bdc4 |
@ -30,6 +30,11 @@ EOF
|
|||||||
local file="$1" full_path="${1:A}"
|
local file="$1" full_path="${1:A}"
|
||||||
local extract_dir="${1:t:r}"
|
local extract_dir="${1:t:r}"
|
||||||
|
|
||||||
|
# Remove the .tar extension if the file name is .tar.*
|
||||||
|
if [[ $extract_dir =~ '\.tar$' ]]; then
|
||||||
|
extract_dir="${extract_dir:r}"
|
||||||
|
fi
|
||||||
|
|
||||||
# If there's a file or directory with the same name as the archive
|
# If there's a file or directory with the same name as the archive
|
||||||
# add a random string to the end of the extract directory
|
# add a random string to the end of the extract directory
|
||||||
if [[ -e "$extract_dir" ]]; then
|
if [[ -e "$extract_dir" ]]; then
|
||||||
|
|||||||
@ -28,16 +28,16 @@ The plugin also supports the following:
|
|||||||
|
|
||||||
## Configuration Variables
|
## Configuration Variables
|
||||||
|
|
||||||
| Variable | Description |
|
| Variable | Description |
|
||||||
| ----------------------------------- | ----------------------------------------------------------------------------- |
|
| ----------------------------------- | ------------------------------------------------------------------------------------------- |
|
||||||
| `ZSH_TMUX_AUTOSTART` | Automatically starts tmux (default: `false`) |
|
| `ZSH_TMUX_AUTOSTART` | Automatically starts tmux (default: `false`) |
|
||||||
| `ZSH_TMUX_AUTOSTART_ONCE` | Autostart only if tmux hasn't been started previously (default: `true`) |
|
| `ZSH_TMUX_AUTOSTART_ONCE` | Autostart only if tmux hasn't been started previously (default: `true`) |
|
||||||
| `ZSH_TMUX_AUTOCONNECT` | Automatically connect to a previous session if it exits (default: `true`) |
|
| `ZSH_TMUX_AUTOCONNECT` | Automatically connect to a previous session if it exits (default: `true`) |
|
||||||
| `ZSH_TMUX_AUTOQUIT` | Automatically closes terminal once tmux exits (default: `ZSH_TMUX_AUTOSTART`) |
|
| `ZSH_TMUX_AUTOQUIT` | Automatically closes terminal once tmux exits (default: `ZSH_TMUX_AUTOSTART`) |
|
||||||
| `ZSH_TMUX_FIXTERM` | Sets `$TERM` to 256-color term or not based on current terminal support |
|
| `ZSH_TMUX_FIXTERM` | Sets `$TERM` to 256-color term or not based on current terminal support |
|
||||||
| `ZSH_TMUX_ITERM2` | Sets the `-CC` option for iTerm2 tmux integration (default: `false`) |
|
| `ZSH_TMUX_ITERM2` | Sets the `-CC` option for iTerm2 tmux integration (default: `false`) |
|
||||||
| `ZSH_TMUX_FIXTERM_WITHOUT_256COLOR` | `$TERM` to use for non 256-color terminals (default: `screen`) |
|
| `ZSH_TMUX_FIXTERM_WITHOUT_256COLOR` | `$TERM` to use for non 256-color terminals (default: `screen`) |
|
||||||
| `ZSH_TMUX_FIXTERM_WITH_256COLOR` | `$TERM` to use for 256-color terminals (default: `screen-256color` |
|
| `ZSH_TMUX_FIXTERM_WITH_256COLOR` | `$TERM` to use for 256-color terminals (default: `screen-256color` |
|
||||||
| `ZSH_TMUX_CONFIG` | Set the configuration path (default: `$HOME/.tmux.conf`) |
|
| `ZSH_TMUX_CONFIG` | Set the configuration path (default: `$HOME/.tmux.conf`, `$XDG_CONFIG_HOME/tmux/tmux.conf`) |
|
||||||
| `ZSH_TMUX_UNICODE` | Set `tmux -u` option to support unicode |
|
| `ZSH_TMUX_UNICODE` | Set `tmux -u` option to support unicode |
|
||||||
| `ZSH_TMUX_DEFAULT_SESSION_NAME` | Set tmux default session name when autostart is enabled |
|
| `ZSH_TMUX_DEFAULT_SESSION_NAME` | Set tmux default session name when autostart is enabled |
|
||||||
|
|||||||
@ -26,12 +26,17 @@ fi
|
|||||||
# systems without the proper terminfo
|
# systems without the proper terminfo
|
||||||
: ${ZSH_TMUX_FIXTERM_WITH_256COLOR:=screen-256color}
|
: ${ZSH_TMUX_FIXTERM_WITH_256COLOR:=screen-256color}
|
||||||
# Set the configuration path
|
# Set the configuration path
|
||||||
: ${ZSH_TMUX_CONFIG:=$HOME/.tmux.conf}
|
if [[ -e $HOME/.tmux.conf ]]; then
|
||||||
|
: ${ZSH_TMUX_CONFIG:=$HOME/.tmux.conf}
|
||||||
|
elif [[ -e ${XDG_CONFIG_HOME:-$HOME/.config}/tmux/tmux.conf ]]; then
|
||||||
|
: ${ZSH_TMUX_CONFIG:=${XDG_CONFIG_HOME:-$HOME/.config}/tmux/tmux.conf}
|
||||||
|
else
|
||||||
|
: ${ZSH_TMUX_CONFIG:=$HOME/.tmux.conf}
|
||||||
|
fi
|
||||||
# Set -u option to support unicode
|
# Set -u option to support unicode
|
||||||
: ${ZSH_TMUX_UNICODE:=false}
|
: ${ZSH_TMUX_UNICODE:=false}
|
||||||
|
|
||||||
# ALIASES
|
# ALIASES
|
||||||
|
|
||||||
alias ta='tmux attach -t'
|
alias ta='tmux attach -t'
|
||||||
alias tad='tmux attach -d -t'
|
alias tad='tmux attach -d -t'
|
||||||
alias ts='tmux new-session -s'
|
alias ts='tmux new-session -s'
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user