diff options
author | Mark Nipper <nipsy@bitgnome.net> | 2024-11-09 23:49:55 -0800 |
---|---|---|
committer | Mark Nipper <nipsy@bitgnome.net> | 2024-11-09 23:49:55 -0800 |
commit | d0d52613b9d039fcbe1f28de7b94eeb5cdc56265 (patch) | |
tree | 5ab8aeeddc52f673fafb7a28ed32cc6488bd7b4c /home/root/common | |
parent | 30f6af5aede78ad0a0eeed24ffe755863d675b5d (diff) | |
download | nix-d0d52613b9d039fcbe1f28de7b94eeb5cdc56265.tar nix-d0d52613b9d039fcbe1f28de7b94eeb5cdc56265.tar.gz nix-d0d52613b9d039fcbe1f28de7b94eeb5cdc56265.tar.bz2 nix-d0d52613b9d039fcbe1f28de7b94eeb5cdc56265.tar.lz nix-d0d52613b9d039fcbe1f28de7b94eeb5cdc56265.tar.xz nix-d0d52613b9d039fcbe1f28de7b94eeb5cdc56265.tar.zst nix-d0d52613b9d039fcbe1f28de7b94eeb5cdc56265.zip |
Add helpful shell commands
Diffstat (limited to '')
-rw-r--r-- | home/root/common/core/zsh/default.nix | 1 | ||||
-rw-r--r-- | home/root/common/core/zsh/zshrc | 11 |
2 files changed, 12 insertions, 0 deletions
diff --git a/home/root/common/core/zsh/default.nix b/home/root/common/core/zsh/default.nix index 5fe88b2..eaec714 100644 --- a/home/root/common/core/zsh/default.nix +++ b/home/root/common/core/zsh/default.nix @@ -27,6 +27,7 @@ export COLORFGBG=";0" ll = "ls -alFhs --color=auto"; nix-list-derivations = "nix-store --query --requisites /run/current-system | cut -d- -f2- | sort | uniq"; nix-list-generations = "nixos-rebuild list-generations | cat; echo; nix-env --list-generations --profile /nix/var/nix/profiles/system"; + pstrace = "bpftrace -e 'tracepoint:syscalls:sys_enter_exec*{ printf(\"pid: %d, comm: %s, args: \", pid, comm); join(args->argv); }'"; zgrep = "zgrep --color=auto"; }; }; diff --git a/home/root/common/core/zsh/zshrc b/home/root/common/core/zsh/zshrc index a0f7fee..28284f8 100644 --- a/home/root/common/core/zsh/zshrc +++ b/home/root/common/core/zsh/zshrc @@ -61,6 +61,17 @@ function nix-depends { } +function ntrace { + + if [[ -z ${argv} ]]; then + echo 'you must specify a command to strace!' >&2 + return 1 + fi + + eval strace -f -e trace=network -s 10000 ${=argv[@]} + +} + # prompt/theme shit function precmd { |