my xfce4 dotfiles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

118 lines
6.5 KiB

3 years ago
  1. # Singlechar plugin
  2. This plugin adds single char shortcuts (and combinations) for some commands.
  3. To use it, add `singlechar` to the plugins array of your zshrc file:
  4. ```
  5. plugins=(... singlechar)
  6. ```
  7. ## Aliases
  8. ### CAT, GREP, CURL, WGET
  9. | Alias | Command | Description |
  10. |-------|------------------|-------------|
  11. | y | `grep -Ri` | Find case-insensitive string in all files and directories, recursively. Follows symlinks. |
  12. | n | `grep -Rvi` | Same as above but only show lines that don't match the string. |
  13. | f | `grep -Rli` | Same as 'y' but only print the filenames where the string is found. |
  14. | fn | `grep -Rlvi` | Same as above but only show files that don't contain the string. |
  15. | f. | `find . \| grep` | Grep list of files in current directory |
  16. | f: | `find` | 'find' command |
  17. | p | `less` | 'less' command |
  18. | m | `man` | 'man' command |
  19. | d | `wget` | 'wget' command |
  20. | u | `curl` | 'curl' command |
  21. | c | `cat` | 'cat' command |
  22. | w | `echo >` | Write arguments to file, overwriting it if it exists. |
  23. | a | `echo >>` | Write arguments to file, appending them if the file exists. |
  24. | w: | `cat >` | Write stdin to file, overwriting if it exists. |
  25. | a: | `cat >>` | Write stdin to file, appending it if the file exists. |
  26. ### XARGS
  27. These aliases are versions of the aliases above but using xargs. This can be used
  28. by piping the arguments to the xargs aliases.
  29. | Alias | Command | Description |
  30. |-------|----------------------|---------------------------------|
  31. | x | `xargs` | 'xargs' command |
  32. | xy | `xargs grep -Ri` | Same as 'y' alias using xargs. |
  33. | xn | `xargs grep -Rvi` | Same as 'n' alias using xargs. |
  34. | xf | `xargs grep -Rli` | Same as 'f' alias using xargs. |
  35. | xfn | `xargs grep -Rlvi` | Same as 'fn' alias using xargs. |
  36. | xf. | `xargs find \| grep` | Same as 'f.' alias using xargs. |
  37. | xf: | `xargs find` | Same as 'f:' alias using xargs. |
  38. | xc | `xargs cat` | Same as 'c' alias using xargs. |
  39. | xp | `xargs less` | Same as 'p' alias using xargs. |
  40. | xm | `xargs man` | Same as 'm' alias using xargs. |
  41. | xd | `xargs wget` | Same as 'd' alias using xargs. |
  42. | xu | `xargs curl` | Same as 'u' alias using xargs. |
  43. | xw | `xargs echo >` | Same as 'w' alias using xargs. |
  44. | xa | `xargs echo >>` | Same as 'a' alias using xargs. |
  45. | xw: | `xargs cat >` | Same as 'w:' alias using xargs. |
  46. | xa: | `xargs >>` | Same as 'a:' alias using xargs. |
  47. ### SUDO
  48. These aliases are versions of the aliases above in [CAT, GREP, CURL, WGET](#cat-grep-curl-wget)
  49. but using sudo to run them with root permission.
  50. | Alias | Command | Description |
  51. |-------|-----------------------|--------------------------------|
  52. | s | `sudo` | 'sudo' command |
  53. | sy | `sudo grep -Ri` | Same as 'y' alias using sudo. |
  54. | sn | `sudo grep -Riv` | Same as 'n' alias using sudo. |
  55. | sf | `sudo grep -Rli` | Same as 'f' alias using sudo. |
  56. | sfn | `sudo grep -Rlvi` | Same as 'fn' alias using sudo. |
  57. | sf. | `sudo find . \| grep` | Same as 'f.' alias using sudo. |
  58. | sf: | `sudo find` | Same as 'f:' alias using sudo. |
  59. | sp | `sudo less` | Same as 'p' alias using sudo. |
  60. | sm | `sudo man` | Same as 'm' alias using sudo. |
  61. | sd | `sudo wget` | Same as 'd' alias using sudo. |
  62. | sc | `sudo cat` | Same as 'c' alias using sudo. |
  63. | sw | `sudo echo >` | Same as 'w' alias using sudo. |
  64. | sa | `sudo echo >>` | Same as 'a' alias using sudo. |
  65. | sw: | `sudo cat >` | Same as 'w:' alias using sudo. |
  66. | sa: | `sudo cat >>` | Same as 'a:' alias using sudo. |
  67. ### SUDO-XARGS
  68. Same as above but using both sudo and xargs.
  69. | Alias | Command | Description |
  70. |-------|---------------------------|---------------------------------|
  71. | sx | `sudo xargs` | 'sudo xargs' command |
  72. | sxy | `sudo xargs grep -Ri` | Same as 'xy' alias using sudo. |
  73. | sxn | `sudo xargs grep -Riv` | Same as 'xn' alias using sudo. |
  74. | sxf | `sudo xargs grep -li` | Same as 'xf' alias using sudo. |
  75. | sxfn | `sudo xargs grep -lvi` | Same as 'xfn' alias using sudo. |
  76. | sxf. | `sudo xargs find \| grep` | Same as 'xf.' alias using sudo. |
  77. | sxf: | `sudo xargs find` | Same as 'xf:' alias using sudo. |
  78. | sxp | `sudo xargs less` | Same as 'xp' alias using sudo. |
  79. | sxm | `sudo xargs man` | Same as 'xm' alias using sudo. |
  80. | sxd | `sudo xargs wget` | Same as 'xd' alias using sudo. |
  81. | sxu | `sudo xargs curl` | Same as 'xu' alias using sudo. |
  82. | sxc | `sudo xargs cat` | Same as 'xc' alias using sudo. |
  83. | sxw | `sudo xargs echo >` | Same as 'xw' alias using sudo. |
  84. | sxa | `sudo xargs echo >>` | Same as 'xa' alias using sudo. |
  85. | sxw: | `sudo xargs cat >` | Same as 'xw:' alias using sudo. |
  86. | sxa: | `sudo xargs cat >>` | Same as 'xa:' alias using sudo. |
  87. ## Options
  88. The commands `grep`, `sudo`, `wget`, `curl`, and `less` can be configured to use other commands
  89. via the setup variables below, before Oh My Zsh is sourced. If they are not set yet, they will
  90. use their default values:
  91. | Setup variable | Default value |
  92. |----------------|---------------|
  93. | GREP | `grep` |
  94. | ROOT | `sudo` |
  95. | WGET | `wget` |
  96. | CURL | `curl` |
  97. | PAGER | `less` |
  98. ## Author
  99. - [Karolin Varner](https://github.com/koraa)