diff options
Diffstat (limited to 'plugins')
-rwxr-xr-x | plugins/emacs/emacsclient.sh | 4 | ||||
-rw-r--r-- | plugins/screen/screen.plugin.zsh | 4 | ||||
-rw-r--r-- | plugins/ssh-agent/ssh-agent.plugin.zsh | 4 | ||||
-rw-r--r-- | plugins/systemadmin/README.md | 22 | ||||
-rw-r--r-- | plugins/systemadmin/systemadmin.plugin.zsh | 2 |
5 files changed, 18 insertions, 18 deletions
diff --git a/plugins/emacs/emacsclient.sh b/plugins/emacs/emacsclient.sh index 0aa8d6f40..04a2c2afd 100755 --- a/plugins/emacs/emacsclient.sh +++ b/plugins/emacs/emacsclient.sh @@ -20,8 +20,8 @@ _emacsfun() # tempfile. (first argument will be `--no-wait` passed in by the plugin.zsh) if [ "$#" -ge "2" -a "$2" = "-" ] then - tempfile="$(mktemp --tmpdir emacs-stdin-$USER.XXXXXXX 2>/dev/null \ - || mktemp -t emacs-stdin-$USER)" # support BSD mktemp + tempfile="$(mktemp --tmpdir emacs-stdin-$USERNAME.XXXXXXX 2>/dev/null \ + || mktemp -t emacs-stdin-$USERNAME)" # support BSD mktemp cat - > "$tempfile" _emacsfun --no-wait $tempfile else diff --git a/plugins/screen/screen.plugin.zsh b/plugins/screen/screen.plugin.zsh index 7009e7a91..c1db8ad92 100644 --- a/plugins/screen/screen.plugin.zsh +++ b/plugins/screen/screen.plugin.zsh @@ -2,7 +2,7 @@ # of the tab window should be. if [[ "$TERM" == screen* ]]; then if [[ $_GET_PATH == '' ]]; then - _GET_PATH='echo $PWD | sed "s/^\/Users\//~/;s/^\/home\//~/;s/^~$USER/~/"' + _GET_PATH='echo $PWD | sed "s/^\/Users\//~/;s/^\/home\//~/;s/^~$USERNAME/~/"' fi if [[ $_GET_HOST == '' ]]; then _GET_HOST='echo $HOST | sed "s/\..*//"' @@ -51,4 +51,4 @@ if [[ "$TERM" == screen* ]]; then eval "tab_hardstatus=$TAB_HARDSTATUS_PREFIX:$TAB_HARDSTATUS_PROMPT" screen_set $tab_title $tab_hardstatus } -fi
\ No newline at end of file +fi diff --git a/plugins/ssh-agent/ssh-agent.plugin.zsh b/plugins/ssh-agent/ssh-agent.plugin.zsh index 430647135..d45406f63 100644 --- a/plugins/ssh-agent/ssh-agent.plugin.zsh +++ b/plugins/ssh-agent/ssh-agent.plugin.zsh @@ -61,11 +61,11 @@ zstyle -b :omz:plugins:ssh-agent agent-forwarding _agent_forwarding if [[ $_agent_forwarding == "yes" && -n "$SSH_AUTH_SOCK" ]]; then # Add a nifty symlink for screen/tmux if agent forwarding - [[ -L $SSH_AUTH_SOCK ]] || ln -sf "$SSH_AUTH_SOCK" /tmp/ssh-agent-$USER-screen + [[ -L $SSH_AUTH_SOCK ]] || ln -sf "$SSH_AUTH_SOCK" /tmp/ssh-agent-$USERNAME-screen elif [[ -f "$_ssh_env_cache" ]]; then # Source SSH settings, if applicable . $_ssh_env_cache > /dev/null - if [[ $USER == "root" ]]; then + if [[ $USERNAME == "root" ]]; then FILTER="ax" else FILTER="x" diff --git a/plugins/systemadmin/README.md b/plugins/systemadmin/README.md index 243db03f2..052fc6edc 100644 --- a/plugins/systemadmin/README.md +++ b/plugins/systemadmin/README.md @@ -10,17 +10,17 @@ plugins=(... systemadmin) ## Aliases -| Alias | Command | Description | -|---------|------------------------------------------------------------------------|--------------------------------------------------------------------| -| ping | `ping -c 5` | Sends only 5 ICMP Messages | -| clr | `clear; echo Currently logged in on $TTY, as $USER 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 | -| mkdir | `mkdir -pv` | Automatically create parent directories and display verbose output | -| psmem | `ps -e -orss=,args= \| sort -b -k1 -nr` | Display the processes using the most memory | -| psmem10 | `ps -e -orss=,args= \| sort -b -k1 -nr \| head -10` | Display the top 10 processes using the most memory | -| pscpu | `ps -e -o pcpu,cpu,nice,state,cputime,args \|sort -k1 -nr` | Display the top processes using the most CPU | -| pscpu10 | `ps -e -o pcpu,cpu,nice,state,cputime,args \|sort -k1 -nr \| head -10` | Display the top 10 processes using the most CPU | -| hist10 | `print -l ${(o)history%% *} \| uniq -c \| sort -nr \| head -n 10` | Display the top 10 most used commands in the history | +| Alias | Command | Description | +|---------|----------------------------------------------------------------------------|--------------------------------------------------------------------| +| ping | `ping -c 5` | Sends only 5 ICMP 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 | +| path | `print -l $path` | Displays PATH with each entry on a separate line | +| mkdir | `mkdir -pv` | Automatically create parent directories and display verbose output | +| psmem | `ps -e -orss=,args= \| sort -b -k1 -nr` | Display the processes using the most memory | +| psmem10 | `ps -e -orss=,args= \| sort -b -k1 -nr \| head -10` | Display the top 10 processes using the most memory | +| pscpu | `ps -e -o pcpu,cpu,nice,state,cputime,args \|sort -k1 -nr` | Display the top processes using the most CPU | +| pscpu10 | `ps -e -o pcpu,cpu,nice,state,cputime,args \|sort -k1 -nr \| head -10` | Display the top 10 processes using the most CPU | +| hist10 | `print -l ${(o)history%% *} \| uniq -c \| sort -nr \| head -n 10` | Display the top 10 most used commands in the history | ## Functions diff --git a/plugins/systemadmin/systemadmin.plugin.zsh b/plugins/systemadmin/systemadmin.plugin.zsh index 03064c035..08136abda 100644 --- a/plugins/systemadmin/systemadmin.plugin.zsh +++ b/plugins/systemadmin/systemadmin.plugin.zsh @@ -21,7 +21,7 @@ function retlog() { } alias ping='ping -c 5' -alias clr='clear; echo Currently logged in on $TTY, as $USER in directory $PWD.' +alias clr='clear; echo Currently logged in on $TTY, as $USERNAME in directory $PWD.' alias path='print -l $path' alias mkdir='mkdir -pv' # get top process eating memory |