diff --git a/README.md b/README.md index a3e39a70..5bf2b933 100644 --- a/README.md +++ b/README.md @@ -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:** Ctrl+Alt+P (`P` for process) - **Preview window:** the CPU usage, memory usage, start time, and other information about the process diff --git a/functions/_fzf_search_processes.fish b/functions/_fzf_search_processes.fish index 32cca203..f0e116fd 100644 --- a/functions/_fzf_search_processes.fish +++ b/functions/_fzf_search_processes.fish @@ -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 \ diff --git a/images/processes.gif b/images/processes.gif new file mode 100644 index 00000000..878ee613 Binary files /dev/null and b/images/processes.gif differ