Last active
February 6, 2020 08:30
-
-
Save udzura/6d40a3f010aff2a4a58f632627ab7f89 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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