diff options
author | 2024-03-25 16:43:09 +0530 | |
---|---|---|
committer | 2024-03-25 16:43:09 +0530 | |
commit | a62114c91f2070c8c8453d117f3d81dc113e41ff (patch) | |
tree | f266e87af29a08c01f82bc32dd7d463d8ec4441a /zsh/oh-my-zsh/plugins/singlechar | |
parent | af120ab348f2e1a5a39dec035ed9dcf84189a64e (diff) | |
download | dotfiles-a62114c91f2070c8c8453d117f3d81dc113e41ff.tar.gz dotfiles-a62114c91f2070c8c8453d117f3d81dc113e41ff.tar.bz2 dotfiles-a62114c91f2070c8c8453d117f3d81dc113e41ff.zip |
dotfile update
Diffstat (limited to 'zsh/oh-my-zsh/plugins/singlechar')
-rw-r--r-- | zsh/oh-my-zsh/plugins/singlechar/README.md | 118 | ||||
-rw-r--r-- | zsh/oh-my-zsh/plugins/singlechar/singlechar.plugin.zsh | 123 |
2 files changed, 0 insertions, 241 deletions
diff --git a/zsh/oh-my-zsh/plugins/singlechar/README.md b/zsh/oh-my-zsh/plugins/singlechar/README.md deleted file mode 100644 index d890299..0000000 --- a/zsh/oh-my-zsh/plugins/singlechar/README.md +++ /dev/null @@ -1,118 +0,0 @@ -# Singlechar plugin - -This plugin adds single char shortcuts (and combinations) for some commands. - -To use it, add `singlechar` to the plugins array of your zshrc file: -``` -plugins=(... singlechar) -``` - -## Aliases - -### CAT, GREP, CURL, WGET - -| Alias | Command | Description | -|-------|------------------|-------------| -| y | `grep -Ri` | Find case-insensitive string in all files and directories, recursively. Follows symlinks. | -| n | `grep -Rvi` | Same as above but only show lines that don't match the string. | -| f | `grep -Rli` | Same as 'y' but only print the filenames where the string is found. | -| fn | `grep -Rlvi` | Same as above but only show files that don't contain the string. | -| f. | `find . \| grep` | Grep list of files in current directory | -| f: | `find` | 'find' command | -| p | `less` | 'less' command | -| m | `man` | 'man' command | -| d | `wget` | 'wget' command | -| u | `curl` | 'curl' command | -| c | `cat` | 'cat' command | -| w | `echo >` | Write arguments to file, overwriting it if it exists. | -| a | `echo >>` | Write arguments to file, appending them if the file exists. | -| w: | `cat >` | Write stdin to file, overwriting if it exists. | -| a: | `cat >>` | Write stdin to file, appending it if the file exists. | - -### XARGS - -These aliases are versions of the aliases above but using xargs. This can be used -by piping the arguments to the xargs aliases. - -| Alias | Command | Description | -|-------|----------------------|---------------------------------| -| x | `xargs` | 'xargs' command | -| xy | `xargs grep -Ri` | Same as 'y' alias using xargs. | -| xn | `xargs grep -Rvi` | Same as 'n' alias using xargs. | -| xf | `xargs grep -Rli` | Same as 'f' alias using xargs. | -| xfn | `xargs grep -Rlvi` | Same as 'fn' alias using xargs. | -| xf. | `xargs find \| grep` | Same as 'f.' alias using xargs. | -| xf: | `xargs find` | Same as 'f:' alias using xargs. | -| xc | `xargs cat` | Same as 'c' alias using xargs. | -| xp | `xargs less` | Same as 'p' alias using xargs. | -| xm | `xargs man` | Same as 'm' alias using xargs. | -| xd | `xargs wget` | Same as 'd' alias using xargs. | -| xu | `xargs curl` | Same as 'u' alias using xargs. | -| xw | `xargs echo >` | Same as 'w' alias using xargs. | -| xa | `xargs echo >>` | Same as 'a' alias using xargs. | -| xw: | `xargs cat >` | Same as 'w:' alias using xargs. | -| xa: | `xargs >>` | Same as 'a:' alias using xargs. | - -### SUDO - -These aliases are versions of the aliases above in [CAT, GREP, CURL, WGET](#cat-grep-curl-wget) -but using sudo to run them with root permission. - -| Alias | Command | Description | -|-------|-----------------------|--------------------------------| -| s | `sudo` | 'sudo' command | -| sy | `sudo grep -Ri` | Same as 'y' alias using sudo. | -| sn | `sudo grep -Riv` | Same as 'n' alias using sudo. | -| sf | `sudo grep -Rli` | Same as 'f' alias using sudo. | -| sfn | `sudo grep -Rlvi` | Same as 'fn' alias using sudo. | -| sf. | `sudo find . \| grep` | Same as 'f.' alias using sudo. | -| sf: | `sudo find` | Same as 'f:' alias using sudo. | -| sp | `sudo less` | Same as 'p' alias using sudo. | -| sm | `sudo man` | Same as 'm' alias using sudo. | -| sd | `sudo wget` | Same as 'd' alias using sudo. | -| sc | `sudo cat` | Same as 'c' alias using sudo. | -| sw | `sudo echo >` | Same as 'w' alias using sudo. | -| sa | `sudo echo >>` | Same as 'a' alias using sudo. | -| sw: | `sudo cat >` | Same as 'w:' alias using sudo. | -| sa: | `sudo cat >>` | Same as 'a:' alias using sudo. | - -### SUDO-XARGS - -Same as above but using both sudo and xargs. - -| Alias | Command | Description | -|-------|---------------------------|---------------------------------| -| sx | `sudo xargs` | 'sudo xargs' command | -| sxy | `sudo xargs grep -Ri` | Same as 'xy' alias using sudo. | -| sxn | `sudo xargs grep -Riv` | Same as 'xn' alias using sudo. | -| sxf | `sudo xargs grep -li` | Same as 'xf' alias using sudo. | -| sxfn | `sudo xargs grep -lvi` | Same as 'xfn' alias using sudo. | -| sxf. | `sudo xargs find \| grep` | Same as 'xf.' alias using sudo. | -| sxf: | `sudo xargs find` | Same as 'xf:' alias using sudo. | -| sxp | `sudo xargs less` | Same as 'xp' alias using sudo. | -| sxm | `sudo xargs man` | Same as 'xm' alias using sudo. | -| sxd | `sudo xargs wget` | Same as 'xd' alias using sudo. | -| sxu | `sudo xargs curl` | Same as 'xu' alias using sudo. | -| sxc | `sudo xargs cat` | Same as 'xc' alias using sudo. | -| sxw | `sudo xargs echo >` | Same as 'xw' alias using sudo. | -| sxa | `sudo xargs echo >>` | Same as 'xa' alias using sudo. | -| sxw: | `sudo xargs cat >` | Same as 'xw:' alias using sudo. | -| sxa: | `sudo xargs cat >>` | Same as 'xa:' alias using sudo. | - -## Options - -The commands `grep`, `sudo`, `wget`, `curl`, and `less` can be configured to use other commands -via the setup variables below, before Oh My Zsh is sourced. If they are not set yet, they will -use their default values: - -| Setup variable | Default value | -|----------------|---------------| -| GREP | `grep` | -| ROOT | `sudo` | -| WGET | `wget` | -| CURL | `curl` | -| PAGER | `less` | - -## Author - -- [Karolin Varner](https://github.com/koraa) diff --git a/zsh/oh-my-zsh/plugins/singlechar/singlechar.plugin.zsh b/zsh/oh-my-zsh/plugins/singlechar/singlechar.plugin.zsh deleted file mode 100644 index d4b0b67..0000000 --- a/zsh/oh-my-zsh/plugins/singlechar/singlechar.plugin.zsh +++ /dev/null @@ -1,123 +0,0 @@ -########################### -# Settings - -# These can be overwritten any time. -# If they are not set yet, they will be -# overwritten with their default values - -default GREP grep -default ROOT sudo -default WGET wget -default CURL curl - -env_default PAGER less - -########################### -# Alias - -# CAT, GREP, CURL, WGET - -alias y='"$GREP" -Ri' -alias n='"$GREP" -Rvi' - -alias f.='find . | "$GREP"' -alias f:='find' - -alias f='"$GREP" -Rli' -alias fn='"$GREP" -Rlvi' - -alias w='echo >' -alias a='echo >>' - -alias c='cat' -alias p='"$PAGER"' - -alias m='man' - -alias d='"$WGET"' -alias u='"$CURL"' - -# enhanced writing - -alias w:='cat >' -alias a:='cat >>' - -# XARGS - -alias x='xargs' - -alias xy='xargs "$GREP" -Ri' -alias xn='xargs "$GREP" -Riv' - -alias xf.='xargs find | "$GREP"' -alias xf:='xargs find' - -alias xf='xargs "$GREP" -Rli' -alias xfn='xargs "$GREP" -Rlvi' - -alias xw='xargs echo >' -alias xa='xargs echo >>' - -alias xc='xargs cat' -alias xp='xargs "$PAGER"' - -alias xm='xargs man' - -alias xd='xargs "$WGET"' -alias xu='xargs "$CURL"' - -alias xw:='xargs cat >' -alias xa:='xargs >>' - -# SUDO - -alias s='"$ROOT"' - -alias sy='"$ROOT" "$GREP" -Ri' -alias sn='"$ROOT" "$GREP" -Riv' - -alias sf.='"$ROOT" find . | "$GREP"' -alias sf:='"$ROOT" find' - -alias sf='"$ROOT" "$GREP" -Rli' -alias sfn='"$ROOT" "$GREP" -Rlvi' - -alias sw='"$ROOT" echo >' -alias sa='"$ROOT" echo >>' - -alias sc='"$ROOT" cat' -alias sp='"$ROOT" "$PAGER"' - -alias sm='"$ROOT" man' - -alias sd='"$ROOT" "$WGET"' - -alias sw:='"$ROOT" cat >' -alias sa:='"$ROOT" cat >>' - -# SUDO-XARGS - -alias sx='"$ROOT" xargs' - -alias sxy='"$ROOT" xargs "$GREP" -Ri' -alias sxn='"$ROOT" xargs "$GREP" -Riv' - -alias sxf.='"$ROOT" xargs find | "$GREP"' -alias sxf:='"$ROOT" xargs find' - -alias sxf='"$ROOT" xargs "$GREP" -li' -alias sxfn='"$ROOT" xargs "$GREP" -lvi' - -alias sxw='"$ROOT" xargs echo >' -alias sxa='"$ROOT" xargs echo >>' - -alias sxc='"$ROOT" xargs cat' -alias sxp='"$ROOT" xargs "$PAGER"' - -alias sxm='"$ROOT" xargs man' - -alias sxd='"$ROOT" xargs "$WGET"' -alias sxu='"$ROOT" xargs "$CURL"' - -alias sxw:='"$ROOT" xargs cat >' -alias sxa:='"$ROOT" xargs cat >>' |