Skip to content

Commit

Permalink
[Search processes] add gif and shorten field name for ppid to PARENT
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrickF1 committed Jan 31, 2022
1 parent 4f926c3 commit 22dd684
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ Use `fzf.fish` to interactively find and insert the shell entities listed below

### Process ids

![gif processes](images/processes.gif)

- **Search input:** the pid and command of all running processes, outputted by `ps`
- **Key binding and mnemonic:** <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>P</kbd> (`P` for process)
- **Preview window:** the CPU usage, memory usage, start time, and other information about the process
Expand Down
2 changes: 1 addition & 1 deletion functions/_fzf_search_processes.fish
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
function _fzf_search_processes --description "Search all running processes. Replace the current token with the pid of the selected process."
# use all caps to be consistent with ps default format
# snake_case because ps doesn't seem to allow spaces in the field names
set ps_preview_fmt (string join ',' 'pid' 'ppid=PARENT_PID' 'user' '%cpu' 'rss=RSS_IN_KB' 'start=START_TIME' 'command')
set ps_preview_fmt (string join ',' 'pid' 'ppid=PARENT' 'user' '%cpu' 'rss=RSS_IN_KB' 'start=START_TIME' 'command')
set processes_selected (
ps -A -opid,command | \
_fzf_wrapper --multi \
Expand Down
Binary file added images/processes.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 22dd684

Please sign in to comment.