Table of Contents
Shell tricks
Updated: 2025-09-05Fuzzy-Finding and Opening Files in Helix (fzf / skim)
-
Open file with fzf:
hx $(fzf) -
Define a shell function (in
~/.bashrcor~/.zshrc):fhx() { hx "$(fzf)"; }Then just run
fhx. -
Limit to project files with
fdorrg:hx $(fd -t f | fzf) # or hx $(rg --files | fzf) -
Open multiple files:
hx $(fzf -m)
🔀 Alternative: You can use skim (sk), a Rust-based fzf clone, in the same way:
hx $(sk)Find and remove file
rm $(sk)Unix
Start a program and still be able to quit the terminal
I usually use:
<program> & disown
- & puts the job in the background, that is, makes it block on attempting to read input, and makes the shell not wait for its completion.
- disown removes the process from the shell's job control, but it still leaves it connected to the terminal. One of the results is that the shell won't send it a SIGHUP. Obviously, it can only be applied to background jobs, because you cannot enter it when a foreground job is running.
- nohup disconnects the process from the terminal, redirects its output to nohup.out and shields it from SIGHUP. One of the effects (the naming one) is that the process won't receive any sent SIGHUP. It is completely independent from job control and could in principle be used also for foreground jobs (although that's not very useful).
Zsh
You can open in the background with the addition of an &; disown:
firefox &; disown
↑ top