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

Allow override of rm and custom fzf options #49

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ollehu
Copy link

@ollehu ollehu commented Oct 15, 2024

It's not unusual to alias rm to something harmless when using, for example, trash to remove files/directories. This PR will enable the user to change that command. This PR also lets the user add additional argument to the fzf_cmd, something that was not working properly before (I believe?)

@ollehu ollehu force-pushed the main branch 2 times, most recently from 6ad7054 to 4e73098 Compare October 15, 2024 15:48
@ollehu ollehu changed the title Allow override of rm Allow override of rm and custom fzf options Oct 15, 2024
@ollehu
Copy link
Author

ollehu commented Oct 15, 2024

Ping @gazorby

@towry
Copy link

towry commented Oct 17, 2024

Hi, how to customize the fzf opts based on your change?

@ollehu
Copy link
Author

ollehu commented Oct 17, 2024

Hi, how to customize the fzf opts based on your change?

Sorry about that, just updated the README. You simply set the fifc_custom_fzf_opts variable. I, for example, do not like the hardcoded --exact flag, so I have set -U fifc_custom_fzf_opts +e in my config.

@towry
Copy link

towry commented Oct 18, 2024

To append a custom fzf command, for example to disable the --exact flag and increase the fuzziness

Thanks for your work, this is exactly the feature that I am missing. can't wait for this to be merged.

@towry
Copy link

towry commented Oct 18, 2024

I don't know if this error is caused by this change.

Expected a combining operator like '-a' at index 4                                                                                                                
 = directories _fifc_source_directories _fifc_comp_2 _fifc_comp_3 _fifc_comp_4 _fifc_comp_5 _fifc_comp_6 _fifc_comp_7 _fifc_comp_8 _fifc_comp_9[1]                                 
               ^                                                                                                                                                                   
/nix/store/2flxhkb7shp3r6s2h3n7b4db6q06ypfc-source/functions/_fifc_action.fish (line 1):                                                                                           
in function '_fifc_action' with arguments 'source'                                                                                                                                 
        called on line 1 of file /nix/store/2flxhkb7shp3r6s2h3n7b4db6q06ypfc-source/functions/_fifc.fish                                                                           
in command substitution                                                                                                                                                            
        called on line 25 of file /nix/store/2flxhkb7shp3r6s2h3n7b4db6q06ypfc-source/functions/_fifc.fish

@gazorby
Copy link
Owner

gazorby commented Oct 19, 2024

I don't know if this error is caused by this change.

Expected a combining operator like '-a' at index 4                                                                                                                
 = directories _fifc_source_directories _fifc_comp_2 _fifc_comp_3 _fifc_comp_4 _fifc_comp_5 _fifc_comp_6 _fifc_comp_7 _fifc_comp_8 _fifc_comp_9[1]                                 
               ^                                                                                                                                                                   
/nix/store/2flxhkb7shp3r6s2h3n7b4db6q06ypfc-source/functions/_fifc_action.fish (line 1):                                                                                           
in function '_fifc_action' with arguments 'source'                                                                                                                                 
        called on line 1 of file /nix/store/2flxhkb7shp3r6s2h3n7b4db6q06ypfc-source/functions/_fifc.fish                                                                           
in command substitution                                                                                                                                                            
        called on line 25 of file /nix/store/2flxhkb7shp3r6s2h3n7b4db6q06ypfc-source/functions/_fifc.fish

This PR has not been merged yet; this error must come from the last one I merged earlier this week.

@gazorby
Copy link
Owner

gazorby commented Oct 19, 2024

Hi @ollehu, Thanks for contributing!
fifc_custom_fzf_opts seems interesting, I will check this out this week.

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.

3 participants