Commit 2ff567e1 authored by Matt Cable's avatar Matt Cable
Browse files

Removed unportable (and unnecessary) grep flags

parent 8f7609b4
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
zdirstore=~/.zdirstore zdirstore=~/.zdirstore
dirpersistinstall () { dirpersistinstall () {
if grep -qL 'dirpersiststore' ~/.zlogout; then if grep 'dirpersiststore' ~/.zlogout > /dev/null; then
else else
if read -q \?"Would you like to set up your .zlogout file for use with dirspersist? (y/n) "; then if read -q \?"Would you like to set up your .zlogout file for use with dirspersist? (y/n) "; then
echo "# Store dirs stack\n# See ~/.oh-my-zsh/plugins/dirspersist.plugin.zsh\ndirpersiststore" >> ~/.zlogout echo "# Store dirs stack\n# See ~/.oh-my-zsh/plugins/dirspersist.plugin.zsh\ndirpersiststore" >> ~/.zlogout
...@@ -19,6 +19,7 @@ dirpersistinstall () { ...@@ -19,6 +19,7 @@ dirpersistinstall () {
fi fi
} }
# FIXME solaris doesn't support tail -r
dirpersiststore () { dirpersiststore () {
dirs -p | tail -r | perl -ne 'chomp;s/([& ])/\\$1/g ;print "if [ -d $_ ]; then pushd -q $_; fi\n"' > $zdirstore dirs -p | tail -r | perl -ne 'chomp;s/([& ])/\\$1/g ;print "if [ -d $_ ]; then pushd -q $_; fi\n"' > $zdirstore
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment