Define fish function, ptree

Get all pstree outputs for a given process name.

Usage:
```fish
> ptree ssh-agent
```

I'm unsure if I like home-managers; I'd prefer defining this functions in a
functions.fish file for a few reasons:
- I like syntax highlighting.
- home-manager compiles this into poorly formatted fish code.
This commit is contained in:
William Carroll 2020-03-13 12:21:43 +00:00
parent c2522a1b7a
commit 2695eae15d

View file

@ -105,6 +105,15 @@
sysust = "systemctl --user status"; sysust = "systemctl --user status";
}; };
promptInit = builtins.readFile ../fish/prompt.fish; promptInit = builtins.readFile ../fish/prompt.fish;
functions = {
ptree = {
body = ''
for pid in (pgrep $argv[1])
pstree -s -p $pid
end
'';
};
};
}; };
programs.fzf = rec { programs.fzf = rec {