Closed rapiz1 closed 4 years ago
That means that either something else is bound to alt-s
, or that sudope is being initialized twice.
What happens if you press alt-s?
@bobthecow sudope
works as usual.
By the way, I installed sudope
by omf
. And this thing never happened before.
Can you paste the output of bind
?
It's strange that I didn't find duplicated \es
bind --preset \cy yank
bind --preset \ey yank-pop
bind --preset -k right forward-char
bind --preset -k left backward-char
bind --preset \e\[C forward-char
bind --preset \e\[D backward-char
bind --preset -k ppage beginning-of-history
bind --preset -k npage end-of-history
bind --preset \cx fish_clipboard_copy
bind --preset \cv fish_clipboard_paste
bind --preset \e cancel
bind --preset \t complete
bind --preset \cs pager-toggle-search
bind --preset -k btab complete-and-search
bind --preset \e\n commandline\ -i\ \\n
bind --preset \e\r commandline\ -i\ \\n
bind --preset -k down down-or-search
bind --preset -k up up-or-search
bind --preset \e\[A up-or-search
bind --preset \e\[B down-or-search
bind --preset -k sright forward-bigword
bind --preset -k sleft backward-bigword
bind --preset \e\eOC nextd-or-forward-word
bind --preset \e\eOD prevd-or-backward-word
bind --preset \e\e\[C nextd-or-forward-word
bind --preset \e\e\[D prevd-or-backward-word
bind --preset \eO3C nextd-or-forward-word
bind --preset \eO3D prevd-or-backward-word
bind --preset \e\[3C nextd-or-forward-word
bind --preset \e\[3D prevd-or-backward-word
bind --preset \e\[1\;3C nextd-or-forward-word
bind --preset \e\[1\;3D prevd-or-backward-word
bind --preset \e\[1\;9C nextd-or-forward-word
bind --preset \e\[1\;9D prevd-or-backward-word
bind --preset \e\eOA history-token-search-backward
bind --preset \e\eOB history-token-search-forward
bind --preset \e\e\[A history-token-search-backward
bind --preset \e\e\[B history-token-search-forward
bind --preset \eO3A history-token-search-backward
bind --preset \eO3B history-token-search-forward
bind --preset \e\[3A history-token-search-backward
bind --preset \e\[3B history-token-search-forward
bind --preset \e\[1\;3A history-token-search-backward
bind --preset \e\[1\;3B history-token-search-forward
bind --preset \e\[1\;9A history-token-search-backward
bind --preset \e\[1\;9B history-token-search-forward
bind --preset \e. history-token-search-backward
bind --preset \el __fish_list_current_token
bind --preset \ew __fish_whatis_current_token
bind --preset \cl echo\ -n\ \(clear\ \|\ string\ replace\ \\e\\\[3J\ \"\"\)\;\ commandline\ -f\ repaint
bind --preset \cc __fish_cancel_commandline
bind --preset \cu backward-kill-line
bind --preset \cw backward-kill-path-component
bind --preset \e\[F end-of-line
bind --preset \e\[H beginning-of-line
bind --preset \ed kill-word
bind --preset \cd delete-or-exit
bind --preset \es __fish_prepend_sudo
bind --preset -k f1 __fish_man_page
bind --preset \eh __fish_man_page
bind --preset \ep __fish_paginate
bind --preset \e\# __fish_toggle_comment_commandline
bind --preset \ee edit_command_buffer
bind --preset \ev edit_command_buffer
bind --preset \e\[I 'emit fish_focus_in'
bind --preset \e\[O false
bind --preset \e\[\?1004h false
bind --preset -M insert \e\[I 'emit fish_focus_in'
bind --preset -M insert \e\[O false
bind --preset -M insert \e\[\?1004h false
bind --preset -m paste \e\[200\~ __fish_start_bracketed_paste
bind --preset -M insert -m paste \e\[200\~ __fish_start_bracketed_paste
bind --preset -M paste \e\[201\~ __fish_stop_bracketed_paste
bind --preset -M paste '' self-insert
bind --preset -M paste \r commandline\ -i\ \\n
bind --preset -M paste \' __fish_commandline_insert_escaped\ \\\'\ \$__fish_paste_quoted
bind --preset -M paste \\ __fish_commandline_insert_escaped\ \\\\\ \$__fish_paste_quoted
bind --preset -M paste ' ' 'if set -q __fish_paste_quoted[1]; or string length -q -- (commandline -c); commandline -i " "; end'
bind --preset '' self-insert
bind --preset ' ' self-insert expand-abbr
bind --preset \n execute
bind --preset \r execute
bind --preset \ck kill-line
bind --preset -k dc delete-char
bind --preset -k backspace backward-delete-char
bind --preset backward-delete-char
bind --preset \e\[1\~ beginning-of-line
bind --preset \e\[4\~ end-of-line
bind --preset -k home beginning-of-line
bind --preset -k end end-of-line
bind --preset -k sdc backward-delete-char
bind --preset \ca beginning-of-line
bind --preset \ce end-of-line
bind --preset \cp up-or-search
bind --preset \cn down-or-search
bind --preset \cf forward-char
bind --preset \cb backward-char
bind --preset \ct transpose-chars
bind --preset \et transpose-words
bind --preset \eu upcase-word
bind --preset \ec capitalize-word
bind --preset \e backward-kill-word
bind --preset \e\b backward-kill-word
bind --preset \eb backward-word
bind --preset \ef forward-word
bind --preset \e\[1\;5C forward-word
bind --preset \e\[1\;5D backward-word
bind --preset \e\< beginning-of-buffer
bind --preset \e\> end-of-buffer
bind --preset \e\ ep fish_clipboard_paste
bind \co __fzf_find_file
bind \cr __fzf_reverse_isearch
bind \ec __fzf_cd
bind \eC '__fzf_cd --hidden'
bind \eO __fzf_open
bind \eo '__fzf_open --editor'
bind -M insert \co __fzf_find_file
bind -M insert \cr __fzf_reverse_isearch
bind -M insert \ec __fzf_cd
bind -M insert \eC '__fzf_cd --hidden'
bind -M insert \eO __fzf_open
bind -M insert \eo '__fzf_open --editor'
bind \t __fzf_complete
bind -M insert \t __fzf_complete
Oh never mind, it's right there in the error. It's bound to __fish_prepend_sudo
, which isn't in the current sudope plugin repo. Did you also install it another way, or install an older version previously?
running functions __fish_prepend_sudo
should tell you where it's coming from.
It's strange that I didn't find duplicated
\es
You don't see it duplicated because sudope checks whether it's bound already, and shows that warning instead of duplicating the binding :)
I looked up the file and found that it comes from the package fish
. And I updated my fish yesterday. Does it mean that this alt-s function is built-in with fish now?
# Defined in /usr/share/fish/functions/__fish_prepend_sudo.fish @ line 1
function __fish_prepend_sudo --description Prepend\ \'sudo\ \'\ to\ the\ beginning\ of\ the\ current\ commandline
set -l cmd (commandline -poc)
if test "$cmd[1]" != "sudo"
commandline -C 0
commandline -i "sudo "
commandline -f end-of-line
end
end
@bobthecow Anyway, thank you for your patience. I learned more about fish from you : )
this does put us in an interesting place, though. the builtin version is much more naive than sudope (it can't remove sudo from the current line, for example).
Is there a workaround to this problem?
There’s a workaround in #13 😄
Work-around appears to be "remove sudope plugin" and now it just works. :+1:
@daveman1010221 the built-in version isn't as robust as sudope, but does the basic bit just fine. if you want everything sudope offers, it's now fixed (since #13 was merged) and updating or reinstalling it should fix everything.
Ok, I've updated and got some new dope. All is well. :-)
sudope: The requested sequence is already in use: --preset \es __fish_prepend_sudo
Everytime I start fish it appears.