Skip to content
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

kill command completion #502

Closed
cmm opened this issue Sep 20, 2024 · 5 comments
Closed

kill command completion #502

cmm opened this issue Sep 20, 2024 · 5 comments

Comments

@cmm
Copy link

cmm commented Sep 20, 2024

ble version: 0.4.0-devel4+063249b
Bash version: 5.2.32(1)-release (x86_64-pc-linux-gnu))

Typing kill % (not necessarily the percent sign, any non-digit character triggers this) causes a widget with a list of all processes on the system to pop up and hijack the input. That's not very helpful (at maximum I'd expect a list of existing jobs under the current shell session if I typed percent), and also it is not obvious how to dismiss the list widget except for holding down Ctrl-C until the shell prompt appears again.

  • Is this a result of some misconfiguration on my end? My whole ble config is this:
          bleopt exec_errexit_mark=
          bleopt term_index_colors=0
          eval $(dircolors)
          ble-face filename_@=none
          bleopt filename_ls_colors="$LS_COLORS"
          bleopt color_scheme=base16
  • Is there a way to disable this specific completion?
  • Is there a way to avoid completion in a specific case, like maybe escaping the percent sign (or whatever) somehow? (EDIT Ctrl-V % works, yay)
  • Is there an orderly way to dismiss the widget, preferably without cancelling the preceding manual input?
@akinomyoga
Copy link
Owner

akinomyoga commented Sep 20, 2024

What are the results of the following commands?

$ ble/widget/display-shell-version
$ kill % # <--- Could you reproduce the problem before running the next command?
$ complete -p kill # <--- This NEEDS TO BE performed AFTER the problem happens

@cmm
Copy link
Author

cmm commented Sep 22, 2024

$ ble/widget/display-shell-version
GNU bash, version 5.2.32(1)-release (x86_64-pc-linux-gnu) [NixOS 24.11 (Vicuna)]
ble.sh, version 0.4.0-devel4+063249b (noarch) [git 2.46.0, GNU Make 4.4.1, GNU Awk 5.2.2, API 3.2, PMA Avon 8-g1]
bash-completion, version 2.14.0 (hash:480ffcc6a751e55621ec526eb5dea7a0d86d9e72, 17877 bytes) (noarch)
atuin, version 18.3.0 (/etc/profiles/per-user/cmm/bin/atuin)
locale: LANG=en_IL.utf8 LC_ADDRESS=en_IL.UTF-8 LC_MEASUREMENT=en_IL.UTF-8 LC_MONETARY=en_IL.UTF-8 LC_NUMERIC=en_IL.UTF-8 LC_PAPER=en_IL.UTF-8 LC_TELEPHONE=en_IL.UTF-8 LC_TIME=en_IL.UTF-8
terminal: TERM=xterm-256color wcwidth=15.0-west/15.1-2+ri, unknown:- (61;7603;1)
options: -hashall +checkjobs +extglob +globstar +histappend -hostcomplete +inherit_errexit
$ kill % ...
$ complete -p kill
complete -o bashdefault -o default -F _skim_complete_kill kill                                                                                                                                                                                                                                                                                                                                                                              

So the widget comes from Skim -- I've just never seen it before starting to use BLE, because without BLE I'd have to actually press Tab after the kill part to display it (which has never occurred to me)

Also, without BLE:

  • The Skim process list widget looks and works the same regardless of the partial input (if any), so there's nothing special about that partial input being % or a letter
  • The widget is dismissible with just one Ctrl-C or Esc, and the partial input is preserved

I'll just remove Skim altogether, as it would seem that FZF/Skim conflict with BLE (all three, after all, do fancy completion). Please feel free to close this issue if the behavior is indeed expected, and thanks.

@akinomyoga
Copy link
Owner

$ complete -p kill
complete -o bashdefault -o default -F _skim_complete_kill kill                                                                                                                                                                                                                                                                                                                                                                              

So the widget comes from Skim

Thanks for the information. I haven't recognized the project Skim.

as it would seem that FZF/Skim conflict with BLE

Yes, it would conflict. For the fzf completion, ble.sh prepares an integration setting as instructed in README. However, I'm not sure if I should start to prepare an integration script for every similar completion that tries to take over the control of the terminal. In addition, there are still many fzf users who don't read README. Maybe I should start to ask each project to directly include the support for ble.sh.

@akinomyoga
Copy link
Owner

Related discussions are found in the following places:

@akinomyoga
Copy link
Owner

akinomyoga commented Oct 19, 2024

I added a workaround for Skim in commit a36d13c.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants