aboutsummaryrefslogtreecommitdiffstats
path: root/home/root/common/core/zsh
diff options
context:
space:
mode:
Diffstat (limited to 'home/root/common/core/zsh')
-rw-r--r--home/root/common/core/zsh/default.nix1
-rw-r--r--home/root/common/core/zsh/zshrc11
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 {