--no-input advanced, Path navigation with fzf
#4228
fsc0
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
demo.mp4
I remember some projects with this kind of approach (use fzf like a file manager).
And also there are well-known modern TUI file managers.
But still playing with these kind of ideas gives a lot of fun to me.
I saved the main script with single name
n.And I have below function in my
.bashrc.Important
Before testing the script,
the configuration path is
~/.config/n/.Save below
n.conf,bookmarksamples to above path then edit for your system.Last, check
n's--bindvalues for each features.Like
afor rename,F7for mkdir,sfor instant shell,spacefor toggle clipboard selection,cfor display clipboard list,pfor paste init action,rfor refresh andyfor yank (filename).n.conf
bookmark
n
UPDATES
2025-02-08
Handle symbolic link for directory.
2025-02-10
Added recursive search (
ctrl-/).Added bookmark. (
')2025-02-11
Added
removeaction forfzf_clipboard.2025-02-12
Added select all (
ctrl-a) and toggle all (v).Added information bar.
Support LS_COLORS.
Support multiple instance.
2025-02-16
Added clipboard indicator
[n]at the information bar.Added clear clipboard selection (
u).2025-02-17
Added instant rename (
a).Added instant mkdir (
F7).Added instant shell (
s).Changed temporary shell binding to
Sfrom;.2025-02-18
Remember clipboard selection for each directory.
Restore right cursor position after clipboard paste actions. (
p)2025-02-19
Added user configuration file
n.conf.Added instant compress of clipboard contents (if none, just focused item) (
C).└
:compress archive_name(zip only).Now
nrestorecd incursor position not justcd ...Added display hidden toggle (
.).Added get total size of clipboard contents (if none, just focused item) (
d).Changed paste method to chain binding (
p).Spawn bookmark list without screen clear.
2025-02-20
Added sort by time (
o).Added
fzf_n_grep_strto handle brackets.Changed substitution method (to
awkfromsed) to handle unique names like "f|i|l|e.txt".Append suffix (
_,_n) for pastepppP.2025-02-21
Inform cd stderr through information bar.
Added invalid symlink handling.
Added cd history navigation (
H: prev,L: next).Improve cd history navigation (with cursor position).
2025-02-23
Suppress inputs until command ls done.
Ignore some bindings at
..(empty directory).Changed paste bindings. (
pp,pofor mv, andpP,pOfor cp).Added clipboard selection for recursive search.
2025-02-24
Use .bashrc function
n()instead ofalias n='source n'.Fixed cd history when there's only 2 logs.
Added trap return SIGINT for
:actions.2025-02-25
Added
fzf_n_pseudo_lsfor less flickering.Execute
:actionsinside of fzf rather thanabortpass.Better
fzf_n_pseudo_lsdecorations (with pos highlight).Respect the fzf environment variables (like
FZF_POS).Added
FZF_N_BINDINGS.2025-02-26
Use fzf-tmux while in tmux session.
└ (Recommend) tmux + fzf-tmux,
npresents zero flickering experience.Changed instant rename method (more like inplace rename).
Added
fzf_n_tmux_popupfor future action update.Separate
fzf_n_openeractions (checkn.conf).Escape ampersands (&) in awk substitution.
2025-02-27
Use information bar to inform unregistered file type.
Maintain cursor position when cd returns stderr.
Added
fzf_n_bulk_rename(A) inn.conf.Added symbolic link
-> absolute pathto information bar.2025-03-02
Inform cd history navigation stderr through information bar.
Reset bookmark cursor position if directory changed.
Suppress
nbindings untilfzf_n_openerends.2025-03-03
Added FZF_N_COLORS in
n.conf.2025-03-25
Changed
fzf_n_clipboardto respect the order of selection (no sort).└ Added feature that
vrdo bulk renaming with above selections.Massive rework of
--bindto handle double quote(s) such asfile".txt├ Added
fzf_n_show_input,fzf_n_input_state.├ Improved
fzf_n_rename,fzf_n_mkdir,fzf_n_compress,fzf_n_sh,fzf_n_rsearch...└ Changed
--bind 'tab,space:'behavior.Added
fzf_n_awk_sub_str├ Fixed the issue that cursor position not recovers after visit root dir '/'.
└ Fixed the issue that clipboard selection not recovers in dir that contains
(),[].Added paste binding
plforln -s.Added conditions that ignore bindings when there's no clipboard selection.
Added
'intoFZF_N_BINDINGS.Fixed the issue that holding
h(fastcd ..) breaks cursor position recovery.Fixed the issue that
fzf_n_opener,fzf_n_shresets search results.Fixed the issue that couldn't cd into selected file's dir in recursive search (
ctrl-/).2025-04-11
Added fzf_n_scope (
i) inn.conf.Added
FZF_N_POINTERinn.conf.Removed last
/when yank the dir with fzf_n_yank (y,Y).Fixed the issue that
fzf_n_compressnot perform the compress with inplace target (no selection).Fixed the issue that
fzf_n_compressnot perform the compress with filename (except extension) that already exists in current dir.2025-04-20
Changed tmux session
fzf_n_renamemethod (using vim).Fixed the issue that
fzf_n_rename_inlinecouldn't get the properFZF_N_RENAME_ORIG.Fixed the issue that
fzf_n_mkdir_findoesn't reload when the new dir has sub dir.Fixed the issue that unselect (toggle off) not working when the target has
+character.Added
--no-scrollbarat the# main fzf command.2025-04-22
Fixed the issue that bottom info not updated when the target removed by
fzf_n_bulk_rename.2025-04-23
Fixed the issue that bottom info not updated with --bind
r.Fixed the issue that cursor position lost after rename a symbolic link with
fzf_n_rename.Fixed the issue that cursor position lost after add/remove file/dir with
fzf_n_opener.Added condition for
fzf_n_renameto move cursor to the very last.of a file.2025-04-24
Fixed the issue that
fzf_n_compress_inlinenot working.2025-05-23
Added
-foption to the commandless.Added bootandy/dust as alternative
ducommand infzf_n_du. (d)Fixed the issue that clipboard compression not perform at the empty directory.
Changed
fzf_n_compress_finto usetmux splitwintead offzf_n_tmux_popup.2025-07-17
Changed
fzf_n_lsto use same pos value instead of 1 to recover cursor position when the focused file not exists while refresh. (r)Added executable handler in
fzf_n_scope. (i)2025-07-26
Fixed the issue that clipboard selection couldn't recover when the target has
*character.Added
scope_ignorefor executable handler infzf_n_scope. (i)2025-07-30
Changed
fzf_n_bulk_renameto use cursor position when it called without clipboard selection. (A)2025-08-04
Added missing
LS_TIME,LS_SORTcheck forfzf_n_bulk_rename(A)2025-08-12
Fixed the issue that
fzf_n_pasteskips rest of work when the variableFZF_N_PASTE_NEW_NAMEassigned.Changed
vrpatch to only proceed mv when the name changed in 'Rename with 2 lists' method.Changed
FZF_N_COLORShandling inn.conf.Changed
FZF_N_MKDIRto use --ghost inside of tmux session. (F7)2025-08-14
Fixed the issue that
name swapfeature in patchedvrnot working. (A)2025-08-23
Fixed wrong cp command in
fzf_n_ls.Changed
fzf_n_cd_historyto ignore navigation input when there's no available entry (H,L).Removed
fzf_n_post_act.└ Renamed
TMP_FZF_N-POST-ACTtoTMP_FZF_N-POST-ABORT.Changed hide cursor (printf '\e[?25l') position in
# main fzf command.└ Added show cursor (printf '\e[?25h') to
fzf_n_bookmarkandn.conf.2025-08-24
Added
--historyoption infzf_n_mkdir. (F7)Changed inline input prompt position to top from bottom.
├ Removed
fzf_n_pseudo_ls.├ Added
inline_print_footerforfzf_n_*_inlineprocess.├ Changed
+execute(...)actions infzf_n_*_inlineto+become(...).└ Added
--syncin# main fzf commandto prevent the blink after+become(...)action.Changed
fzf_n_duto ignore action input when the cursor placed at the..(empty directory). (d)2025-08-29
Added
fzf_n_clipboard_gento generate clipboard list.├ Added
fzf_n_clipboard_gen_rsearchforfzf_n_rsearch.└ Removed
transform:fzf_n_clipboard ...actions from--bind tab,space.Added feature that change directory via command cd in
fzf_n_sh.Removed information bar until find the better way to handle delay.
├ Removed
--bind focusand--bind multi.└ Removed
transform-header:fzf_n_print_header ...actions from each--bind.Added
fzf_n_bulk_rename.└ Removed
fzf_n_bulk_renamefromn.conf.Added vim folds in
--bind.└ Removed
fzf_n_show_input,fzf_n_input_stateAdded
FZF_N_POINTER_PADDINGfor text positioning infzf_n_bookmark.2025-08-30
Added feature that focus cursor to the very first pasted source after
fzf_n_pastedone. (p)├ Added
FZF_N_PASTE_INITandFZF_N_PASTE_IS_DIRfor the above process.└ Added
fzf_n_paste_init_pushto push the name of very first pasted source.Added
fzf_n_cyclefor the cyclic scroll.└ Added
FZF_N_CYCLEinn.conf.Added
LS_ALLinfzf_n_ls_cmdto handle conditional output.Commented out the command
ls ... > TMP_FZF_N-FINFOinfzf_n_ls_cmd.2025-09-04
Added
VR_MAINinvr.diffto handle exact lines that changed.Added escaping
.rule infzf_n_grep_str.Renamed
LS_TIMEtoLS_ARGSfor better understanding.└ Renamed
TMP_FZF_N-LS-TIME-STRtoTMP_FZF_N-LS-ARGSfor better understanding.Changed
TMP_FZF_N-POS-STRto write position string outside of sub function.2025-09-05
Fixed the issue that search key (
/) not working when previous search has no result.└ Added
FZF_POS_STRvariable to test empty{}value.2025-09-08
Added version and extension sort. (
o)├ Renamed variable
TMP_FZF_N-LS-TIMEtoTMP_FZF_N-LS-SORT└ Renamed function
fzf_n_ls_timetofzf_n_ls_sort2025-09-11
Fixed an issue where the cursor was restored to the wrong position after using
fzf_n_openerwith a filter keyword.Changed
--bind 'load:transform:...'actions.└ Removed
--bind 'change:transform:...actions.Changed
FILE_MIME_TYPE_ALERTaction infzf_n_opener.2025-09-14
Fixed an issue where revisiting a directory containing
[,-,]characters caused agrep: Invalid range enderror. (l)└ Added variable
GREP_FZF_SEL.2025-09-20
Changed
fzf_n_lstofzf_n_ls 2> /dev/nullin main fzf command.└ This change prevents ls stderr like
ls: cannot open directory 'dir': Transport endpoint is not connected.2025-10-03
Fixed an issue where cd didn't work with directories starting with the ~ character.
2025-10-10
Added parallel in
vr.diff2025-10-31
Fixed an issue where patched
vrwas unable to rename targets containing the"character.2025-11-05
Fixed an issue where patched
vrwas unable to rename targets containing the`character.Bulk renaming tool in
fzf_n_bulk_renamefunction is modified version of snah/vim-bulk-rename by below patch.Below patch is adding features like
recursive rename+extension filter+name swap+rename with 2 listsand
delete (rm -rf)[WARN].vr.diff
Beta Was this translation helpful? Give feedback.
All reactions