feat: added history fzf finder feature to nushell configuration
All checks were successful
ci / nix-fmt (push) Successful in 1m51s
All checks were successful
ci / nix-fmt (push) Successful in 1m51s
This commit is contained in:
parent
4664673ee7
commit
f70ad82bc2
3 changed files with 28 additions and 7 deletions
6
flake.lock
generated
6
flake.lock
generated
|
|
@ -179,11 +179,11 @@
|
|||
"dotfiles": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1762326182,
|
||||
"narHash": "sha256-O4I41s9NJRFThrJY7c6mXmQGLMOQKbqivLxCPkqnCqU=",
|
||||
"lastModified": 1763222861,
|
||||
"narHash": "sha256-jpTKgYT+AZCoHse20y0LVEeJ9F+MvCJtaHHqF/gp7Io=",
|
||||
"owner": "c4patino",
|
||||
"repo": "dotfiles",
|
||||
"rev": "4bc7186a25899186d9bb739ec1c3a3e2bd4c7bca",
|
||||
"rev": "7d035c4bee6e64f1bd2ac694bac1b045d3bc84d2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 3c04583b0e04660976fa00cd676c8d1bfac1e239
|
||||
Subproject commit 7d035c4bee6e64f1bd2ac694bac1b045d3bc84d2
|
||||
|
|
@ -20,9 +20,30 @@ in {
|
|||
enable = true;
|
||||
configFile.text = ''
|
||||
$env.config = {
|
||||
buffer_editor: "nvim"
|
||||
edit_mode: "vi"
|
||||
show_banner: false
|
||||
buffer_editor: "nvim"
|
||||
edit_mode: "vi"
|
||||
show_banner: false
|
||||
keybindings: [
|
||||
{
|
||||
name: fuzzy_history_fzf
|
||||
modifier: control
|
||||
keycode: char_r
|
||||
mode: [emacs , vi_normal, vi_insert]
|
||||
event: {
|
||||
send: executehostcommand
|
||||
cmd: "commandline edit --replace (
|
||||
history
|
||||
| get command
|
||||
| reverse
|
||||
| uniq
|
||||
| str join (char -i 0)
|
||||
| fzf --scheme=history --read0 --tiebreak=chunk --layout=reverse --preview='echo {..}' --preview-window='bottom:3:wrap' --bind alt-up:preview-up,alt-down:preview-down --height=70% -q (commandline) --preview='echo -n {} | nu --stdin -c \'nu-highlight'''
|
||||
| decode utf-8
|
||||
| str trim
|
||||
)"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
# gitignore.io command
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue