diff options
Diffstat (limited to 'user')
-rw-r--r-- | user/zsh/zshrc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/user/zsh/zshrc b/user/zsh/zshrc index cd5a4986..6a60a060 100644 --- a/user/zsh/zshrc +++ b/user/zsh/zshrc @@ -26,6 +26,18 @@ field () { } alias f=field +delink () { + if [[ ! -h "$1" ]] + then + echo "$1 is not a symlink" + return 1 + fi + local src=$(readlink "$1") + rm "$1" + cp "$src" "$1" + chmod u+w "$1" +} + backward-argument () { local WORDCHARS="\!\`~#@$%^&*()-_=+[{]}\|;:,<.>/?\'\"" zle backward-word |