From 17bc7530ba307a50fd197248b2b0697d2326ef66 Mon Sep 17 00:00:00 2001 From: Kaleb Elwert Date: Tue, 11 Jul 2017 11:58:56 -0700 Subject: [PATCH] Update documentation on safeops --- modules/utility/README.md | 17 +++++++++++++---- runcoms/zpreztorc | 14 +++++++++----- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/modules/utility/README.md b/modules/utility/README.md index 57e3b07..9e9e34c 100644 --- a/modules/utility/README.md +++ b/modules/utility/README.md @@ -65,17 +65,13 @@ Aliases - `_` executes a command as another user (`sudo`). - `b` opens the default web browser. - - `cp` copies files and directories interactively. - `diffu` shorthand for `diff --unified` - `e` opens the default editor. - - `ln` links files and directories interactively. - `mkdir` creates directories, including intermediary directories. - - `mv` moves files and directories interactively. - `p` opens the default pager. - `po` removes a directory from the stack and changes to it (`popd`). - `pu` changes the directory and pushes the old directory onto the stack (`pushd`). - - `rm` removes files and directories interactively. - `sa` search aliases for a word. - `type` displays all the attribute values of a shell parameter. @@ -111,6 +107,19 @@ Aliases - `topc` displays information about processes sorted by CPU 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 - `http-serve` serves a directory via HTTP. diff --git a/runcoms/zpreztorc b/runcoms/zpreztorc index 66f88d7..fcf1204 100644 --- a/runcoms/zpreztorc +++ b/runcoms/zpreztorc @@ -171,11 +171,6 @@ zstyle ':prezto:module:prompt' theme 'sorin' # Set the terminal multiplexer title format. # 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 # @@ -191,3 +186,12 @@ zstyle ':prezto:module:prompt' theme 'sorin' # Set the 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