diff options
author | William Carroll <wpcarro@gmail.com> | 2020-03-13T12·21+0000 |
---|---|---|
committer | William Carroll <wpcarro@gmail.com> | 2020-03-13T12·21+0000 |
commit | 2695eae15da2df407f6c111af0930b4bcd9c5515 (patch) | |
tree | 29d8e17463920901d3e75a7b8c6fe1e9ae22e6f8 /configs | |
parent | c2522a1b7afa452ca95ea754adcdad7ef524fc14 (diff) |
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.
Diffstat (limited to 'configs')
-rw-r--r-- | configs/.config/nixpkgs/home.nix | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/configs/.config/nixpkgs/home.nix b/configs/.config/nixpkgs/home.nix index 51e857b823b5..08dd489b9988 100644 --- a/configs/.config/nixpkgs/home.nix +++ b/configs/.config/nixpkgs/home.nix @@ -105,6 +105,15 @@ sysust = "systemctl --user status"; }; promptInit = builtins.readFile ../fish/prompt.fish; + functions = { + ptree = { + body = '' + for pid in (pgrep $argv[1]) + pstree -s -p $pid + end + ''; + }; + }; }; programs.fzf = rec { |