singlechar.plugin.zsh 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. ################################################################################
  2. # FILE: singlechar.plugin.zsh
  3. # DESCRIPTION: oh-my-zsh plugin file.
  4. # AUTHOR: Michael Varner (musikmichael@web.de)
  5. # VERSION: 1.0.0
  6. #
  7. # This plugin adds single char shortcuts (and combinations) for some commands.
  8. #
  9. ################################################################################
  10. ###########################
  11. # Settings
  12. # These can be overwritten any time.
  13. # If they are not set yet, they will be
  14. # overwritten with their default values
  15. default GREP grep
  16. default ROOT sudo
  17. default WGET wget
  18. default CURL curl
  19. env_default PAGER less
  20. ###########################
  21. # Alias
  22. # CAT, GREP, CURL, WGET
  23. alias y='"$GREP" -Ri'
  24. alias n='"$GREP" -Rvi'
  25. alias f.='find . | "$GREP"'
  26. alias f:='find'
  27. alias f='"$GREP" -Rli'
  28. alias fn='"$GREP" -Rlvi'
  29. alias w='echo >'
  30. alias a='echo >>'
  31. alias c='cat'
  32. alias p='"$PAGER"'
  33. alias m='man'
  34. alias d='"$WGET"'
  35. alias u='"$CURL"'
  36. # enhanced writing
  37. alias w:='cat >'
  38. alias a:='cat >>'
  39. # XARGS
  40. alias x='xargs'
  41. alias xy='xargs "$GREP" -Ri'
  42. alias xn='xargs "$GREP" -Riv'
  43. alias xf.='xargs find | "$GREP"'
  44. alias xf:='xargs find'
  45. alias xf='xargs "$GREP" -Rli'
  46. alias xfn='xargs "$GREP" -Rlvi'
  47. alias xw='xargs echo >'
  48. alias xa='xargs echo >>'
  49. alias xc='xargs cat'
  50. alias xp='xargs "$PAGER"'
  51. alias xm='xargs man'
  52. alias xd='xargs "$WGET"'
  53. alias xu='xargs "$CURL"'
  54. alias xw:='xargs cat >'
  55. alias xa:='xargs >>'
  56. # SUDO
  57. alias s='"$ROOT"'
  58. alias sy='"$ROOT" "$GREP" -Ri'
  59. alias sn='"$ROOT" "$GREP" -Riv'
  60. alias sf.='"$ROOT" find . | "$GREP"'
  61. alias sf:='"$ROOT" find'
  62. alias sf='"$ROOT" "$GREP" -Rli'
  63. alias sfn='"$ROOT" "$GREP" -Rlvi'
  64. alias sw='"$ROOT" echo >'
  65. alias sa='"$ROOT" echo >>'
  66. alias sc='"$ROOT" cat'
  67. alias sp='"$ROOT" "$PAGER"'
  68. alias sm='"$ROOT" man'
  69. alias sd='"$ROOT" "$WGET"'
  70. alias sw:='"$ROOT" cat >'
  71. alias sa:='"$ROOT" cat >>'
  72. # SUDO-XARGS
  73. alias sx='"$ROOT" xargs'
  74. alias sxy='"$ROOT" xargs "$GREP" -Ri'
  75. alias sxn='"$ROOT" xargs "$GREP" -Riv'
  76. alias sxf.='"$ROOT" xargs find | "$GREP"'
  77. alias sxf:='"$ROOT" xargs find'
  78. alias sxf='"$ROOT" xargs "$GREP" -li'
  79. alias sxfn='"$ROOT" xargs "$GREP" -lvi'
  80. alias sxw='"$ROOT" xargs echo >'
  81. alias sxa='"$ROOT" xargs echo >>'
  82. alias sxc='"$ROOT" xargs cat'
  83. alias sxp='"$ROOT" xargs "$PAGER"'
  84. alias sxm='"$ROOT" xargs man'
  85. alias sxd='"$ROOT" xargs "$WGET"'
  86. alias sxu='"$ROOT" xargs "$CURL"'
  87. alias sxw:='"$ROOT" xargs cat >'
  88. alias sxa:='"$ROOT" xargs cat >>'