Closed zw963 closed 3 years ago
Following is a gif to reproduce:
I can confirm when use helm-do-ag
instead of helm-do-ag-this-file
, it works, but, not working with helm-do-ag-this-file
,
if when search in current file, can do search based on current directory all files use press 'C-j', and based on one leave up directory again when press 'C-j' again, that will be a very good experience.
Any update on this? if i describe not clear enough? thank you.
Maybe what i described is not so clear, in fact, i workaround this, and basically achieve the same effect, following is my config:
(defun helm-quit-and-helm-do-ag-current-directory ()
"Drop into `helm-do-ag-current-directory' from `helm'."
(interactive)
(with-helm-alive-p
(helm-run-after-exit (lambda () (helm-do-ag default-directory)))
))
(global-set-key (kbd "C-r") 'helm-do-ag-this-file)
(define-key helm-ag-map [(control r)] 'helm-quit-and-helm-do-ag-current-directory)
The feature what i expected is, if we can omit step 2, Ctrl+j search on current directory directly, will be appreciated a lot, anyway, consider current directory as a up level of current file, is a meanful default.
helm-ag--last-command
("ag" "--nocolor" "--nogroup" "--ignore=.min.js" "--ignore=.js" "--ignore=.json" "--ignore=.log" "--ignore=TAGS" "--ignore=tags" "--ignore=test-reports" "--ignore=\#\#" "--ignore=.\#" "--ignore=*~" "Faraday" "lib/faraday/adapter.rb")
Actual behavior
When i run
helm-do-ag-this-file
for lib/fadaray/adapter.rb, i got 3 result, it is expected. in this case, when I pressCtrl+l
(helm-ag-do-ag-up-one-level), i can see the folder in helm search bar is switched to parent folder, but, the really result keep no changed. (still 3 result)Expected behavior
I can very ensure, should return many result. (i guess the bug maybe is: ag still search only one file, not parent folder)
My personal settings:
Thanks