Fish shell bits
Run and disown
In my old zsh config I had this:
function dos() {
# run_disowned and silenced
nohup "$@" >/dev/null 2>&1 & disown
}
Emulating my old dos
command in fish:
- disown - remove a process from the list of jobs — fish-shell 3.7.0 documentation:
firefox &; disown
starts and disowns ffx.
- terminal - How do I get fish to swallow? or at least to detach itself from a program - Stack Overflow
Both together give this solution:
function dos
echo "disowning $argv"
command $argv >/dev/null 2>&1 &
disown
end
Shell notation for $(cmd)
shell - Fish equivalent of bash $(command) notation - Stack Overflow:
- bash: $(command)
- fish: (command)
which
command
type - locate a command and describe its type — fish-shell 3.7.0 documentation:
type commandname
.
[I] sh@nebra~/me/me-qs $ type cc
cc is a function with definition
# Defined in /home/sh/.config/fish/config.fish @ line 184
function cc
echo ">>> $argv"
command python3 -c "from math import *; from statistics import *; print($argv);"
end
Nel mezzo del deserto posso dire tutto quello che voglio.
comments powered by Disqus