fish: Use full format listing for ps
Using ps -e is not that helpful since it does not show the full command line which is what is helpful in filtering and distinguishing between multiple processes. For eg. we might have multiple processes running using python and to distinguish between them we need the full command line invocation.
This commit is contained in:
parent
a7b12dc642
commit
61e617e494
1 changed files with 5 additions and 5 deletions
|
@ -349,11 +349,11 @@ function dotg --description "Generate gstreamer dot graph for selected file"
|
|||
end
|
||||
|
||||
function gdba --description "Attach to a process"
|
||||
gdb attach -p (ps -e | fzf | awk '{print $1}' | head -1)
|
||||
gdb attach -p (ps -ef | fzf | awk '{print $2}' | head -1)
|
||||
end
|
||||
|
||||
function gdbp --description "Attach to a python process"
|
||||
gdb python3 (ps -e | fzf | awk '{print $1}' | head -1)
|
||||
gdb python3 (ps -ef | fzf | awk '{print $2}' | head -1)
|
||||
end
|
||||
|
||||
function gdbr --description "Start a command/process with rust-gdb"
|
||||
|
@ -361,7 +361,7 @@ function gdbr --description "Start a command/process with rust-gdb"
|
|||
end
|
||||
|
||||
function pst --description "Show process tree of a process"
|
||||
set proc (ps -e | fzf | awk '{print $1}' | head -1)
|
||||
set proc (ps -ef | fzf | awk '{print $2}' | head -1)
|
||||
pstree -H $proc $proc
|
||||
end
|
||||
|
||||
|
@ -380,12 +380,12 @@ function cdG --description "Select a coredump to run coredumpctl gdb"
|
|||
end
|
||||
|
||||
function pft --description "Select a process to run perf top"
|
||||
set proc (ps -e | fzf | awk '{print $1}')
|
||||
set proc (ps -ef | fzf | awk '{print $2}')
|
||||
perf top -p $proc
|
||||
end
|
||||
|
||||
function pfr --description "Select a process to record performance data in given file name"
|
||||
set proc (ps -e | fzf | awk '{print $1}')
|
||||
set proc (ps -ef | fzf | awk '{print $2}')
|
||||
perf record -F 99 -o $argv -p $proc
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue