Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fzf-z widget #3

Draft
wants to merge 12 commits into
base: master
Choose a base branch
from
Draft

Add fzf-z widget #3

wants to merge 12 commits into from

Conversation

deeuu
Copy link

@deeuu deeuu commented Jul 4, 2020

Hi,

Thanks for maintaining this xontrib, great to see the subprocess workaround for using fzf with xonsh!

This PR adds a new widget that searches the combination of (displayed in this order):

  • The file/dir listing under the working directory
  • Any paths listed in a 'bookmark' file located at $SHELL_BOOKMARKS (defaults to ~/.shell_bookmarks)
  • The output of z -l ..

It is loosely based on the fzf-z plugin for zsh.

It might be too subjective, based on my needs, so let me know if you think the widget would be better served as a dedicated xontrib.

Will add to the readme if you think it would make a nice addition!

Copy link
Owner

@laloch laloch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @deeuu, thanks for putting this in!
Would you mind updating the README to document the change?

@deeuu
Copy link
Author

deeuu commented Jul 13, 2020

Hey @laloch, have made a few updates, see what you think.

Notable changes:

  • I decided to drop the cwd listing because we already have the fzf_file and fzf_dir - no need to be greedy!
  • Use the cursor prefix as fzf query argument.

@deeuu
Copy link
Author

deeuu commented Jul 18, 2020

@laloch deciding to close for now as I want to consider a few additional features, e.g. auto-cd if the command buffer is empty when calling the widget.

@deeuu deeuu closed this Jul 18, 2020
@laloch
Copy link
Owner

laloch commented Jul 21, 2020

You could have only turn this into a draft.

@deeuu deeuu reopened this Jul 21, 2020
@deeuu deeuu marked this pull request as draft July 21, 2020 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants