mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-24 01:37:27 +08:00
Merge branch 'ohmyzsh:master' into pdfcreating
This commit is contained in:
commit
90814f3597
11
plugins/chezmoi/README.md
Normal file
11
plugins/chezmoi/README.md
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# chezmoi Plugin
|
||||||
|
|
||||||
|
## Introduction
|
||||||
|
|
||||||
|
This `chezmoi` plugin sets up completion for [chezmoi](https://chezmoi.io).
|
||||||
|
|
||||||
|
To use it, add `chezmoi` to the plugins array of your zshrc file:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
plugins=(... chezmoi)
|
||||||
|
```
|
||||||
14
plugins/chezmoi/chezmoi.plugin.zsh
Normal file
14
plugins/chezmoi/chezmoi.plugin.zsh
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# COMPLETION FUNCTION
|
||||||
|
if (( ! $+commands[chezmoi] )); then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
# If the completion file doesn't exist yet, we need to autoload it and
|
||||||
|
# bind it to `chezmoi`. Otherwise, compinit will have already done that.
|
||||||
|
if [[ ! -f "$ZSH_CACHE_DIR/completions/_chezmoi" ]]; then
|
||||||
|
typeset -g -A _comps
|
||||||
|
autoload -Uz _chezmoi
|
||||||
|
_comps[chezmoi]=_chezmoi
|
||||||
|
fi
|
||||||
|
|
||||||
|
chezmoi completion zsh >| "$ZSH_CACHE_DIR/completions/_chezmoi" &|
|
||||||
@ -100,7 +100,11 @@ function _add_identities() {
|
|||||||
if zstyle -t :omz:plugins:ssh-agent agent-forwarding \
|
if zstyle -t :omz:plugins:ssh-agent agent-forwarding \
|
||||||
&& [[ -n "$SSH_AUTH_SOCK" ]]; then
|
&& [[ -n "$SSH_AUTH_SOCK" ]]; then
|
||||||
if [[ ! -L "$SSH_AUTH_SOCK" ]]; then
|
if [[ ! -L "$SSH_AUTH_SOCK" ]]; then
|
||||||
ln -sf "$SSH_AUTH_SOCK" /tmp/ssh-agent-$USERNAME-screen
|
if [[ -n "$TERMUX_VERSION" ]]; then
|
||||||
|
ln -sf "$SSH_AUTH_SOCK" "$PREFIX"/tmp/ssh-agent-$USERNAME-screen
|
||||||
|
else
|
||||||
|
ln -sf "$SSH_AUTH_SOCK" /tmp/ssh-agent-$USERNAME-screen
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
_start_agent
|
_start_agent
|
||||||
|
|||||||
@ -13,6 +13,7 @@ plugins=(... systemadmin)
|
|||||||
| Alias | Command | Description |
|
| Alias | Command | Description |
|
||||||
|---------|----------------------------------------------------------------------------|--------------------------------------------------------------------|
|
|---------|----------------------------------------------------------------------------|--------------------------------------------------------------------|
|
||||||
| ping | `ping -c 5` | Sends only 5 ICMP Messages |
|
| ping | `ping -c 5` | Sends only 5 ICMP Messages |
|
||||||
|
| ping6 | `ping6 -c 5` | Sends only 5 ICMPv6 Messages |
|
||||||
| clr | `clear; echo Currently logged in on $TTY, as $USERNAME in directory $PWD.` | Clears the screen and prints the current user, TTY, and directory |
|
| clr | `clear; echo Currently logged in on $TTY, as $USERNAME in directory $PWD.` | Clears the screen and prints the current user, TTY, and directory |
|
||||||
| path | `print -l $path` | Displays PATH with each entry on a separate line |
|
| path | `print -l $path` | Displays PATH with each entry on a separate line |
|
||||||
| mkdir | `mkdir -pv` | Automatically create parent directories and display verbose output |
|
| mkdir | `mkdir -pv` | Automatically create parent directories and display verbose output |
|
||||||
|
|||||||
@ -21,6 +21,7 @@ function retlog() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
alias ping='ping -c 5'
|
alias ping='ping -c 5'
|
||||||
|
alias ping6='ping6 -c 5'
|
||||||
alias clr='clear; echo Currently logged in on $TTY, as $USERNAME in directory $PWD.'
|
alias clr='clear; echo Currently logged in on $TTY, as $USERNAME in directory $PWD.'
|
||||||
alias path='print -l $path'
|
alias path='print -l $path'
|
||||||
alias mkdir='mkdir -pv'
|
alias mkdir='mkdir -pv'
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user