Skip to content

Commit

Permalink
Merge pull request #146 from regisxu/issue/87
Browse files Browse the repository at this point in the history
Fix #87: ag-dired can't work on win7 32bit
  • Loading branch information
Wilfred authored Feb 25, 2018
2 parents d00aa65 + 4752401 commit 77b4f50
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions ag.el
Original file line number Diff line number Diff line change
Expand Up @@ -547,11 +547,17 @@ See also `find-dired'."
(buffer-name (if ag-reuse-buffers
"*ag dired*"
(format "*ag dired pattern:%s dir:%s*" regexp dir)))
(cmd (concat ag-executable " " (combine-and-quote-strings ag-dired-arguments " ") " -g '" regexp "' "
(shell-quote-argument dir)
" | grep -v '^$' | sed s/\\'/\\\\\\\\\\'/ | xargs -I '{}' "
insert-directory-program " "
dired-listing-switches " '{}' &")))
(cmd (if (string= system-type "windows-nt")
(concat ag-executable " " (combine-and-quote-strings ag-dired-arguments " ") " -g \"" regexp "\" "
(shell-quote-argument dir)
" | grep -v \"^$\" | sed \"s/'/\\\\\\\\'/g\" | xargs -I '{}' "
insert-directory-program " "
dired-listing-switches " '{}' &")
(concat ag-executable " " (combine-and-quote-strings ag-dired-arguments " ") " -g '" regexp "' "
(shell-quote-argument dir)
" | grep -v '^$' | sed s/\\'/\\\\\\\\\\'/g | xargs -I '{}' "
insert-directory-program " "
dired-listing-switches " '{}' &"))))
(with-current-buffer (get-buffer-create buffer-name)
(switch-to-buffer (current-buffer))
(widen)
Expand Down

0 comments on commit 77b4f50

Please sign in to comment.