Git Product home page Git Product logo

Comments (7)

rockandska avatar rockandska commented on August 26, 2024

I've just take a look at the gradle completion script and should be easy to implement.
Without testing it, i'm also pretty sure you will hit without fzf-obc unsuspected things if you use one of those options with a filename/directory with a space in it : -b|--build-file|-c|--settings-file|-I|--init-script|-g|--gradle-user-home|--include-build|--project-cache-dir|--project-dir

After looking at how it works, it should be easy to implement.
I will ping you when done

from fzf-obc.

rockandska avatar rockandska commented on August 26, 2024

If you don't mind to have the description in fzf-obc ( because i need to had a hook for this kind of purpose ), you could try to add a post function (in a same way as with sort) as the one bellow :

__fzf_obc_post__gradle() {
	local prev
	_get_comp_words_by_ref -n : -p prev
	case "$prev" in
		-b|--build-file|-c|--settings-file|-I|--init-script|-g|--gradle-user-home|--include-build|--project-cache-dir|--project-dir)
			compopt -o filenames
			return 0
			;;
		*)
			local i
			for i in "${!COMPREPLY[@]}";do
				COMPREPLY[$i]="${COMPREPLY[i]%%  *}"
			done
			return 0
			;;
	esac
}

from fzf-obc.

rockandska avatar rockandska commented on August 26, 2024

Did it solve your problem ?
Just merge a better documentation available here and will add a new feature who will allow you to preserve the descriptions when displaying choice but will be removed when selected

Regards,

from fzf-obc.

gene-pavlovsky avatar gene-pavlovsky commented on August 26, 2024

I'd like to try it out, what should I do? Add the __fzf_obc_post__gradle function somewhere?

from fzf-obc.

rockandska avatar rockandska commented on August 26, 2024

Hi @gene-pavlovsky ,

I add it as a 'plugin' in 1.3.0 and should work out of the box with >= 1.3.0

Feel free to post here if there is something who didn't work as expected and i will reopen this issue if needed.

Regards,

from fzf-obc.

gene-pavlovsky avatar gene-pavlovsky commented on August 26, 2024

Ah, it works without any additional configuration, indeed! I just had to try it, silly me :)
It works great, thank you so much for your efforts!
The plugins are all activated by default?

from fzf-obc.

rockandska avatar rockandska commented on August 26, 2024

Yeah, all plugins (only two at this time ^^) are activated by default but could be deactivated independently if not working as expected or don't want them.

I'm not really satisfied yet with how i implemented the plugins but should not change so much

Regards,

from fzf-obc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.