diff options
author | Tuowen Zhao <ztuowen@gmail.com> | 2018-07-11 10:39:25 -0700 |
---|---|---|
committer | Tuowen Zhao <ztuowen@gmail.com> | 2018-07-11 10:39:25 -0700 |
commit | 852e7fe005267f74f3c04a4ddbb310522eee8014 (patch) | |
tree | 73e9f36d8bdcc979d7499580505738074e5a1dc9 /plugins/perms/perms.plugin.zsh | |
parent | 59e91cd97fcc3c406751f019215f957b36614022 (diff) | |
parent | 7cb5fa8aea3d325fee08e3c1708abd12cdea1c1c (diff) | |
download | zsh-852e7fe005267f74f3c04a4ddbb310522eee8014.tar.gz zsh-852e7fe005267f74f3c04a4ddbb310522eee8014.tar.bz2 zsh-852e7fe005267f74f3c04a4ddbb310522eee8014.zip |
Merge branch 'master' of https://github.com/robbyrussell/oh-my-zsh
Diffstat (limited to 'plugins/perms/perms.plugin.zsh')
-rw-r--r-- | plugins/perms/perms.plugin.zsh | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/perms/perms.plugin.zsh b/plugins/perms/perms.plugin.zsh index 7cdebab7f..1a7472c1c 100644 --- a/plugins/perms/perms.plugin.zsh +++ b/plugins/perms/perms.plugin.zsh @@ -6,10 +6,14 @@ ### Aliases # Set all files' permissions to 644 recursively in a directory -alias set644='find . -type f ! -perm 644 -print0 | xargs -0 chmod 644' +set644() { + find "${@:-.}" -type f ! -perm 644 -print0 | xargs -0 chmod 644 +} # Set all directories' permissions to 755 recursively in a directory -alias set755='find . -type d ! -perm 755 -print0 | xargs -0 chmod 755' +set755() { + find "${@:-.}" -type d ! -perm 755 -print0 | xargs -0 chmod 755 +} ### Functions |