summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElliott Williams <e@elliottwillia.ms>2014-07-21 11:15:09 -0400
committerElliott Williams <e@elliottwillia.ms>2014-07-21 11:15:09 -0400
commit73212ded4ee70c010a92eb7a126daa20c7453cba (patch)
treea1e8dcd57de2089698b50c2caacd0460c26cd728
parent207b6a1e338e03ba06cccf255fbaa7e6147e8f94 (diff)
downloadzsh-73212ded4ee70c010a92eb7a126daa20c7453cba.tar.gz
zsh-73212ded4ee70c010a92eb7a126daa20c7453cba.tar.bz2
zsh-73212ded4ee70c010a92eb7a126daa20c7453cba.zip
Fix osx function: "not valid in this context"
I have been continually having problems with the "trash" function provided by the osx plugin, getting this error: trash:local:2: not valid in this context: It seems like adding quotes around the assignment in [osx.plugin.zsh#L142](https://github.com/robbyrussell/oh-my-zsh/blob/master/plugins/osx/osx.plugin.zsh#L142) fixed my problem. Does this look good to you? Thanks!
-rw-r--r--plugins/osx/osx.plugin.zsh2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/osx/osx.plugin.zsh b/plugins/osx/osx.plugin.zsh
index a63f0ee05..2eea0d8ef 100644
--- a/plugins/osx/osx.plugin.zsh
+++ b/plugins/osx/osx.plugin.zsh
@@ -139,7 +139,7 @@ function man-preview() {
function trash() {
local trash_dir="${HOME}/.Trash"
- local temp_ifs=$IFS
+ local temp_ifs="$IFS"
IFS=$'\n'
for item in "$@"; do
if [[ -e "$item" ]]; then