/modules/utility/README.md

https://bitbucket.org/rafaelmoreira/prezto · Markdown · 158 lines · 115 code · 43 blank · 0 comment · 0 complexity · 06ff0993c50b76ba1730a610450dd13c MD5 · raw file

  1. Utility
  2. =======
  3. Defines general aliases and functions.
  4. Settings
  5. --------
  6. ### Highlighting
  7. If you have enabled color globally in *zpreztorc*, you may disable it for certain
  8. commands.
  9. To disable `ls` color, add the following line to *zpreztorc*; when coloring is
  10. disabled, type indicators (\*, /, =>, @, =, |, %) will be appended to entries.
  11. zstyle ':prezto:module:utility:ls' color 'no'
  12. To disable `diff` highlighting, add the following line to *zpreztorc*:
  13. zstyle ':prezto:module:utility:diff' color 'no'
  14. To disable `wdiff` highlighting, add the following line to *zpreztorc*:
  15. zstyle ':prezto:module:utility:wdiff' color 'no'
  16. To disable `make` highlighting, add the following line to *zpreztorc*:
  17. zstyle ':prezto:module:utility:make' color 'no'
  18. Aliases
  19. -------
  20. ### Disabled Spelling Correction
  21. - `ack`
  22. - `cd`
  23. - `cp`
  24. - `ebuild`
  25. - `gcc`
  26. - `gist`
  27. - `grep`
  28. - `heroku`
  29. - `ln`
  30. - `man`
  31. - `mkdir`
  32. - `mv`
  33. - `mysql`
  34. - `rm`
  35. ### Disabled File Globbing
  36. - `fc`
  37. - `find`
  38. - `ftp`
  39. - `history`
  40. - `locate`
  41. - `rake`
  42. - `rsync`
  43. - `scp`
  44. - `sftp`
  45. ### General
  46. - `_` executes a command as another user (`sudo`).
  47. - `b` opens the default web browser.
  48. - `cp` copies files and directories interactively.
  49. - `e` opens the default editor.
  50. - `ln` links files and directories interactively.
  51. - `mkdir` creates directories, including intermediary directories.
  52. - `mv` moves files and directories interactively.
  53. - `p` opens the default pager.
  54. - `po` removes a directory from the stack and changes to it (`popd`).
  55. - `pu` changes the directory and pushes the old directory onto the stack
  56. (`pushd`).
  57. - `rm` removes files and directories interactively.
  58. - `type` displays all the attribute values of a shell parameter.
  59. ### Files and Directories
  60. - `ls` lists with directories grouped first (GNU only).
  61. - `l` lists in one column, hidden files.
  62. - `ll` lists human readable sizes.
  63. - `lr` lists human readable sizes, recursively.
  64. - `la` lists human readable sizes, hidden files.
  65. - `lm` lists human readable sizes, hidden files through pager.
  66. - `lx` lists sorted by extension (GNU only).
  67. - `lk` lists sorted by size, largest last.
  68. - `lt` lists sorted by date, most recent last.
  69. - `lc` lists sorted by date, most recent last, shows change time.
  70. - `lu` lists sorted by date, most recent last, shows access time.
  71. - `sl` lists directory contents (`ls`).
  72. ### Mac OS X Everywhere
  73. - `o` opens files and directories (`open` or `xdg-open`).
  74. - `get` downloads files (`curl` or `wget`).
  75. - `pbcopy` copies to the pasteboard (`pbcopy`, `xclip` or `xsel`).
  76. - `pbpaste` pastes from the pasteboard (`pbcopy`, `xclip` or `xsel`).
  77. - `pbc` copies to the pasteboard (`pbcopy`).
  78. - `pbp` pastes from the pasteboard (`pbpaste`).
  79. ### Resource Usage
  80. - `df` displays free disk space using human readable units.
  81. - `du` displays disk usage using human readable units.
  82. - `top` displays information about processes (aliased to `htop`, if installed).
  83. - `topc` displays information about processes sorted by CPU usage (`htop` not
  84. installed).
  85. - `topm` displays information about processes sorted by RAM usage (`htop` not
  86. installed).
  87. ### Miscellaneous
  88. - `http-serve` serves a directory via HTTP.
  89. Functions
  90. ---------
  91. ### General
  92. - `slit` prints columns *1, 2, 3 ... n*.
  93. ### Files and Directories
  94. - `cdls` changes to a directory and lists its contents.
  95. - `dut` displays the grand total disk usage using human readable units.
  96. - `find-exec` finds files and executes a command on them.
  97. - `mkdcd` makes a directory and changes to it.
  98. - `popdls` pops an entry off the directory stack and lists its contents.
  99. - `pushdls` pushes an entry onto the directory stack and lists its contents.
  100. ### Developer
  101. - `diff` highlights diff output (requires `colordiff` or `Git`).
  102. - `make` highlights make output (requires `colormake`).
  103. - `wdiff` highlights wdiff output (requires `wdiff `or `Git`).
  104. ### Resource usage
  105. - `psu` displays user owned processes status.
  106. ### Search and Replace
  107. - `prep` provides a grep-like pattern search.
  108. - `psub` provides a sed-like pattern substitution.
  109. Authors
  110. -------
  111. *The authors of this module should be contacted via the [issue tracker][1].*
  112. - [Robby Russell](https://github.com/robbyrussell)
  113. - [Suraj N. Kurapati](https://github.com/sunaku)
  114. - [Sorin Ionescu](https://github.com/sorin-ionescu)
  115. [1]: https://github.com/sorin-ionescu/prezto/issues