--no-input
advanced, Path n
avigation 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
,bookmark
samples to above path then edit for your system.Last, check
n
's--bind
values for each features.Like
a
for rename,F7
for mkdir,s
for instant shell,space
for toggle clipboard selection,c
for display clipboard list,p
for paste init action,r
for refresh andy
for 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
remove
action 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 infomation 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
S
from;
.2025-02-18
Remember clipboard selection for each directory.
Restore right cursor position after instant or fzf_paste actions.
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
n
restorecd in
cursor 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_str
to handle brackets.Changed substitution method (to
awk
fromsed
) to handle unique names like "f|i|l|e.txt".Append suffix (
_
,_n
) for pastepp
pP
.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
Supress inputs until ls ready.
Ignore some bindings at
..
(empty directory).Changed paste bindings. (
pp
,po
for mv, andpP
,pO
for 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_ls
for less flickering.Execute
:actions
inside of fzf rather thanabort
pass.Better
fzf_n_pseudo_ls
decorations (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,
n
presents zero flickering experience.Changed instant rename method (more like inplace rename).
Added
fzf_n_tmux_popup
for future action update.Separate
fzf_n_opener
actions (checkn.conf
).Escape ampersands (&) in awk sub.
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 path
to information bar.2025-03-02
Inform cd history navigation stderr through information bar.
Reset bookmark cursor position if directory changed.
Suppress
n
bindings untilfzf_n_opener
ends.2025-03-03
Added FZF_N_COLORS in
n.conf
.2025-03-25
Changed
fzf_n_clipboard
to respect the order of selection (no sort).└ Added feature that
vr
do bulk renaming with above selections.Massive rework of
--bind
to 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
pl
forln -s
.Added conditions that ignore bindings when there's no clipboard selection.
Added
'
into FZF_N_BINDINGS.Fixed the issue that holding
h
(fastcd ..
) breaks cursor position recovery.Fixed the issue that
fzf_n_opener
,fzf_n_sh
resets 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_POINTER in
n.conf
.Removed last
/
when yank the dir with fzf_n_yank (y
,Y
).Fixed the issue that
fzf_n_compress
not perform the compress with inplace target (no selection).Fixed the issue that
fzf_n_compress
not perform the compress with filename (except extension) that already exists in current dir.2025-04-20
Changed tmux session
fzf_n_rename
method (using vim).Fixed the issue that
fzf_n_rename_inline
couldn't get the proper FZF_N_RENAME_ORIG.Fixed the issue that
fzf_n_mkdir_fin
doesn'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-scrollbar
at 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_rename
to move cursor to the very last.
of a file.2025-04-24
Fixed the issue that
fzf_n_compress_inline
not working.2025-05-23
Added
-f
option to the commandless
.Added dust as alternative
du
command infzf_n_du
. (d
)Fixed the issue that clipboard compression not perform at the empty directory.
Changed
fzf_n_compress_fin
to usetmux splitw
intead offzf_n_tmux_popup
.2025-07-17
Changed
fzf_n_ls
to 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_ignore
for executable handler infzf_n_scope
. (i
)2025-07-30
Changed
fzf_n_bulk_rename
to use cursor position when it called without clipboard selection. (A
)2025-08-04
Added missing
LS_TIME
,LS_SORT
check forfzf_n_bulk_rename
(A
)2025-08-12
Fixed the issue that
fzf_n_paste
skips rest of work when the variable FZF_N_PASTE_NEW_NAME assigned.Changed
vr
patch to only proceed mv when the name changed in 'Rename with 2 lists' method.Changed
FZF_N_COLORS
handling inn.conf
example.Changed
FZF_N_MKDIR
to use --ghost inside of tmux session. (F7
)2025-08-14
Fixed the issue that
name swap
feature in patchedvr
not working. (A
)Known issue
Still finding a way to keep the query string and it's input stream without using
xdotool key Escape
.└ Check
--bind 'load:transform:...'
and--bind 'change:transform:...'
.NOTE
Example bulk renaming tool in
n.conf
command is modified version of vim-bulk-rename by below patch.Below patch is adding features like
recursive rename
+extension filter
+name swap
+rename with 2 lists
and
delete (rm -rf)
[WARN].vr.diff
Beta Was this translation helpful? Give feedback.
All reactions