Skip to content

Instantly share code, notes, and snippets.

@udzura
Last active February 6, 2020 08:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save udzura/6d40a3f010aff2a4a58f632627ab7f89 to your computer and use it in GitHub Desktop.
Save udzura/6d40a3f010aff2a4a58f632627ab7f89 to your computer and use it in GitHub Desktop.
#!/bin/bash
trepo() {
local TP="$1"
cat /sys/kernel/debug/tracing/events/$TP/format;
}
_trepo_compl() {
local args
args=$( cd /sys/kernel/debug/tracing/events ; find */* -type d )
COMPREPLY=( `compgen -W "$args" -- ${COMP_WORDS[COMP_CWORD]}` );
}
complete -F _trepo_compl trepo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment