1
0
mirror of https://github.com/dcarrillo/prezto.git synced 2024-12-22 18:38:00 +00:00

Update documentation on safeops

This commit is contained in:
Kaleb Elwert 2017-07-11 11:58:56 -07:00
parent aad91beb3c
commit 17bc7530ba
2 changed files with 22 additions and 9 deletions

View File

@ -65,17 +65,13 @@ Aliases
- `_` executes a command as another user (`sudo`). - `_` executes a command as another user (`sudo`).
- `b` opens the default web browser. - `b` opens the default web browser.
- `cp` copies files and directories interactively.
- `diffu` shorthand for `diff --unified` - `diffu` shorthand for `diff --unified`
- `e` opens the default editor. - `e` opens the default editor.
- `ln` links files and directories interactively.
- `mkdir` creates directories, including intermediary directories. - `mkdir` creates directories, including intermediary directories.
- `mv` moves files and directories interactively.
- `p` opens the default pager. - `p` opens the default pager.
- `po` removes a directory from the stack and changes to it (`popd`). - `po` removes a directory from the stack and changes to it (`popd`).
- `pu` changes the directory and pushes the old directory onto the stack - `pu` changes the directory and pushes the old directory onto the stack
(`pushd`). (`pushd`).
- `rm` removes files and directories interactively.
- `sa` search aliases for a word. - `sa` search aliases for a word.
- `type` displays all the attribute values of a shell parameter. - `type` displays all the attribute values of a shell parameter.
@ -111,6 +107,19 @@ Aliases
- `topc` displays information about processes sorted by CPU usage. - `topc` displays information about processes sorted by CPU usage.
- `topm` displays information about processes sorted by RAM usage. - `topm` displays information about processes sorted by RAM usage.
### Safe ops
By default, `cp`,`ln`, `mv`, and `rm` are aliased to their interactive variants.
If this is not desired, you can disable it by adding
`zstyle ':prezto:module:utility' safe-ops no` to your zpreztorc.
In addition, the following aliases have been added:
- `cpi` copies files and directories interactively.
- `lni` links files and directories interactively.
- `mvi` moves files and directories interactively.
- `rmi` removes files and directories interactively.
### Miscellaneous ### Miscellaneous
- `http-serve` serves a directory via HTTP. - `http-serve` serves a directory via HTTP.

View File

@ -171,11 +171,6 @@ zstyle ':prezto:module:prompt' theme 'sorin'
# Set the terminal multiplexer title format. # Set the terminal multiplexer title format.
# zstyle ':prezto:module:terminal:multiplexer-title' format '%s' # zstyle ':prezto:module:terminal:multiplexer-title' format '%s'
# safe-ops is enabled by default. This aliases rm, mv, cp, and ln so that they
# prompt before deleting or copying over files. Set to no to disable this safer
# behavior.
# zstyle ':prezto:module:utility' safe-ops yes
# #
# Tmux # Tmux
# #
@ -191,3 +186,12 @@ zstyle ':prezto:module:prompt' theme 'sorin'
# Set the default session name: # Set the default session name:
# zstyle ':prezto:module:tmux:session' name 'YOUR DEFAULT SESSION NAME' # zstyle ':prezto:module:tmux:session' name 'YOUR DEFAULT SESSION NAME'
#
# Utility
#
# safe-ops is enabled by default. This aliases rm, mv, cp, and ln so that they
# prompt before deleting or copying over files. Set to no to disable this safer
# behavior.
# zstyle ':prezto:module:utility' safe-ops yes