-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Search processes] allow multi-selection and clean up code a little #219
Conversation
|
||
### A commit hash | ||
### Commit hashes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This and Shell variables header should have been plural to represent the ability to select multiple of them
@@ -1,18 +1,21 @@ | |||
function _fzf_search_processes --description "Search all running processes. Replace the current token with the pid of the selected process." | |||
set token (commandline --current-token) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved into the call to _fzf_wrapper to simplify
--ansi \ | ||
--header-lines=1 \ | ||
--preview='ps -o pid,user,ppid,%cpu,rss,time,start,command -p {1}' \ | ||
$fzf_processes_opts | ||
) | ||
|
||
if test $status -eq 0 | ||
set pid_selected (string split --no-empty " " $process_selected)[1] | ||
commandline --current-token --replace -- (string escape -- $pid_selected) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
string escape was unnecessary
@@ -7,7 +7,7 @@ function fzf_configure_bindings --description "Installs the default key bindings | |||
set options_spec h/help 'directory=?' 'git_log=?' 'git_status=?' 'history=?' 'variables=?' 'processes=?' | |||
argparse --max-args=0 --ignore-unknown $options_spec -- $argv 2>/dev/null | |||
if test $status -ne 0 | |||
echo "Invalid option or a positional argument was provided." 1>&2 | |||
echo "Invalid option or a positional argument was provided." >&2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
out of scope change to make writing to stderr more consistent
No description provided.