-
-
Notifications
You must be signed in to change notification settings - Fork 525
add best fzf aliases ever #569
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
Conversation
Configs/.zshenv
Outdated
| alias f_efc='_fuzzy_edit_search_file_content' # [fz]f [e]dit [f]ile, search by [c]ontent | ||
| alias fcd='_fuzzy_open_directory' # [fz]f [o]pen [d]irectory | ||
| alias f_ef='_fuzzy_edit_search_file' # [fz]f [e]dit [f]ile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO it's better to have a conventional namespace for fzf.
Example:
We use ff as prefix (I guess it's not straining than flat_`
ffcd - Fuzzy Finder Change Directory
ffe - Fuzzy Finder Edit (edit and search keywords can be omitted as Fuzzy Finder already indicates a Search and in linux everything is a file)
ffec - Fuzzy Finder Edit Content (Consistent according to above with [c] being treated as a flag. Edit Content)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better to have a conventional namespace for fzf.
I AGREE!
I'll paypal you $0.42 if you take over the namings 😄😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I currently have 0.0011 so that would be a lot 😂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i like how my PRs literally turn into a discor chat ! 😄😄
|
@prime-run Might be too much but check this out first. Also, the older implementation seems useless if you have files that are deeply nested. so I explicity add find command on every level. Though, it makes the function long. I guess this can be refactored. Preview250505_13h09m29s_recording.mp4 |
Configs/.zshenv
Outdated
| content_search=true | ||
| shift | ||
| ;; | ||
| --regex) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this can go so wrong on lower end machines!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
useless if you have files that are deeply nested
could please elaborate with an example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't search .zshrc because there is zshrc in .config/cfg_backups/.zshrc which always comes first.
also better to load shallower files than deep.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what could cause a bootleneck in here? regex? or multiple find command?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't search .zshrc
unless you mean .zshrc\ directory, I'd call it a feature not a bug😄 (the -d flag in find command)
what could cause a bootleneck
I would argue the whole while loop!
you can monitor your memory allocation to confirm!
|
and about like in the screen shot below, the goal is to cd to UPDATE: now i see what you did there! I guess i stand by:
and to be honest, as a |
|
Ah yeah. I see... how about the ffe and ffec? I'll revert the ffod later as I understand the intent. |
|
Owww Cool! |
I commited some edits
tbh I think my first commits was simple, fast and fairly usable! UPDATE: now that we are clear with ffcd intent,
|
is this final ? maybe we can move our fzf stuff to a seprate file and built on top of that in future if that fits your vision |
We can add it as a plugin on our plugin installation for zsh or make it a core script and make it POSIX as much possible.
This
I don't mind nuking the But please add fzf args to make it like a inline pop menu not a fullscreen (So it feels natural drop down ). About |
well it's assumed you are in the correct directory and you want to search for the file via its content. other wise the search results would be a mess! for example cd to your Basically using it in lower level directories such as
that's doable for sure! we can use |
|
Cool, ready for merging? |
I think so |
so let me pull of the exact same thing ( cool ? |
This is an automated PR to promote changes from `dev` to `master`. Please review and test before merging. ## For Testers See [TESTING.md](./TESTING.md) for complete testing instructions. ## Suggested Merge Schedule According to our release policy, this PR is expected to be merged on: **Friday** Testers are encouraged to test the changes before merging. Please note that this schedule may be adjusted based on the needs of the project. ## Commits to be merged: --- * chore Add keybind for game launcher (#597) (891b181) by ProfShiba * feat (hyde-ipc): Our very own IPC handler! (5c4221f) by kRHYME7 * fix(zsh): Use `.user.zsh` (f1446ab) by kRHYME7 * feat(hyde-config): A Go implementation of the parse.config.py (b6c7bb8) by kRHYME7 * chore Add missing modules to Starship config (#577) (12d113b) by prime-run * fix: [Bug]: Defer oh-my-zsh loading may not be the best option #578 (882fef0) by kRHYME7 * chore implement fzf-shell integration for `fish` (#575) (e750c97) by prime-run * fix(fastfetch): Correct random handler (3cb0434) by kRHYME7 * chore add best fzf aliases ever (#569) (503711a) by prime-run * fix(zsh): Explicit history integration (55721cb) by kRHYME7 * fixed the link color being same as normal text (#570) (ca3c158) by amit * fix: [Bug]: Game Launcher isn't showing anything #447 (96be51a) by kRHYME7 * chore style: discord dcol file changes (#566) (63a2949) by amit * chore refactor(zsh): cleanup zsh for incoing fzf features (abc1a7b) by prime-run * chore breaking(zsh): move ~/.hyde.zshrc to more consistent name `~/.user.zsh` (bb76750) by kRHYME7 * chore Merge branch 'master' of https://github.com/hyde-project/hyde into dev (1254f3f) by kRHYME7 * chore Merge branch 'master' into dev (73efd7c) by Khing --- Please review the changes carefully before merging.


Description
This PR introduces three functions to
.zshenvtaking advantage offzf, aiming for better and faster Terminal navigation.The mentioned aliased functions are as follows:
This approach takes advantage of
fzfby directly inputtingquerywhich benefits us by:Some extra features:
1- excluding unwanted search results in
fodfunction2- null
$EDITORfallback3- adjustable
max_depth=5for fuzzy finding4- etc...
Type of change
Please put an
xin the boxes that apply:Checklist
Screenrecors
fcdfzf-hyde.mp4
instead of doing :
cd ~/Projects/rust/wallrust/srcwe just
fuzzyit viafcdvideo demonstrates 2 fuzzy "searchings" for the target dir!
f_efc2025-05-04.19-57-11.mp4
we fuzzy find files containing target keyword (in this case
saveandos) in the directory and selecting it opens the file in $EDITORAdditional context
batandripgrepfishshell will be pushed in a different PR