laughedelic / pisces Goto Github PK
View Code? Open in Web Editor NEW♓️ Fish shell plugin that helps you to work with paired symbols in the command line
License: Other
♓️ Fish shell plugin that helps you to work with paired symbols in the command line
License: Other
Copy pasting creates undesired behavior.
Pasting the following into my terminal:
echo -e "\e[1;31mSome red message\e[0m"
Will result in:
echo -e "\e[1;31mSome red message\e[0m""]]"
At first I thought it might be my terminal, but the behavior exists whether I use terminator, xterm, or the default terminal for Xubuntu 16.04.
This plugin unconditionally overwrites the \t
bind. Making this configurable would allow it to be used at the same time as https://github.com/fisherman/fzf.
Alternatively, the current binding of \t
could be preserved and called within pices' wrapping bind.
I created a $OMF_CONFIG/key_bindings.fish
file where I placed 2 keybinds:
bind \b backward-kill-path-component # ctrl+backspace
bind \e\[3\;5~ kill-word # ctrl+delete
ctrl+delete works fine while ctrl+backspace doesnt at all. Before using pisces i had these keybinds in ~/.config/fish/config.fish
as:
function fish_user_key_bindings
bind \b backward-kill-path-component # ctrl+backspace
bind \e\[3\;5~ kill-word # ctrl+delete
end
The above worked for both binds.
fish lazy loading of functions needs a function file name matching the function name. pisces tab override completion function is called _pisces_complete
and mapped as such in user keybindings, but the containing file is _pisces_tab.fish
, which will make the mapping spew errors on every fish session but the initial one.
I've recently installed this plugin via Fisher. After many shell reloads and reinstalls I came to the conclusion that it was not working. On the other hand, when installed through omf I've have had no problem at all.
I haven't altered fisher's default configuration, and it has worked for all the other plugins I've used.
I'm using Arch Linux and Kitty as terminal emulator.
Congrats on this great plugin, anyway. I find it really useful and comfortable.
Frequently, I'll type a command and then want to go back and quote or parenthesize one of the arguments, e.g.
ls some directory
to
ls "some directory"
but Pisces will change that to
ls ""some directory""
which is not what I want.
Let's add a variable to disable autoinsertion unless the cursor is at the end of the line. I'll try to have a PR in by the end of the day.
I uninstalled the package using fisher however I still get completions How do i completely remove pisces from my shell
I've noticed that with Pisces installed in my (fairly minimally configured) fish shell, I get keypress performance issues.
Specifically, if I type a string with a couple of Pisces pairs, such as echo "()foobar[]()foobar[]()foobar[]()foobar[]"
, then try to delete some characters (by holding down delete), my shell lags considerably. It usually takes a few hundred ms after I let of the backspace key before it stops deleting. If I uninstall Pisces, then backspacing is instant, no matter what string I am backspacing and for how long.
I am using iTerm 2, if that matters.
For me, the performance issue means that Pisces is not worth using. Is there anyway this could be fixed? I looked at the backspace function and it seems pretty minimal, so I'm not sure how it could be improved.
Also, thanks so much for developing this plugin - I don't mean to complain. I just want to let you know about the performance issues in case you didn't already.
~/.config/fish/conf.d/pisces_key_bindings.fish (line 2): switch: Expected exactly one argument, got 0 switch $fish_key_bindings ^ from sourcing file ~/.config/fish/conf.d/pisces_key_bindings.fish called on line 250 of file /usr/share/fish/config.fish from sourcing file /usr/share/fish/config.fish called during startup
on a fresh Mac, I'm trying out fish... I have very few things installed yet pisces doesn't work. I have no clue how to debug. help? :)
Expected behavior in an interactive session:
> set cmd one two
> set -a cmd "three"
> set --show cmd
$cmd: set in global scope, unexported, with 3 elements
$cmd[1]: |one|
$cmd[2]: |two|
$cmd[3]: |three|
Observed behavior in an interactive session with pisces installed:
> set cmd one two
> set -a cmd "three"
> set --show cmd
$cmd: set in global scope, unexported, with 2 elements
$cmd[1]: |set -a cmd |
$cmd[2]: |three|
The command input was set -a cmd "three[enter]
. When the closing"
is also typed as in set -a cmd "three"[enter]
the output is:
$cmd: set in global scope, unexported, with 2 elements
$cmd[1]: |set -a cmd "three"|
$cmd[2]: |three|
However when the complete line set -a cmd "three"
is pasted in it works correctly.
I can reproduce this consistently on my system with fish version 3.7.1 in a fresh config directory with only jorgebucaran/fisher and laughedelic/pisces installed.
Not sure if there is much pisces can do about it, but fish completion breaks inside autocompleted pairs, probably because the closing symbol is then added to the tokens parsed for completion. Without pisces
echo "$<tab>
will complete variable names, but with it
echo "$<tab>"
will offer no completions.
When I input -abc
in my shell and erase a few characters,
string sub: Unknown option '-ab'
~/.config/fish/functions/_pisces_backspace.fish (line 2):
in command substitution
called on line 7 of file ~/.config/fish/functions/_pisces_backspace.fish
in function '_pisces_backspace'
called on standard input
string - manipulate strings
string escape [(-n | --no-quoted)] [--style=xxx] [STRING...] string join [(-q |
--quiet)] SEP [STRING...] string join0 [(-q | --quiet)] [STRING...] string length
[(-q | --quiet)] [STRING...] string lower [(-q | --quiet)] [STRING...] string match
[(-a | --all)] [(-e | --entire)] [(-i | --ignore-case)] [(-r | --regex)]
[(-n | --index)] [(-q | --quiet)] [(-v | --invert)] PATTERN [STRING...]
string: Type 'help string' for related documentation
[: Missing argument at index 2
[: Missing argument at index 2
[: Missing argument at index 2
[: Missing argument at index 2
[: Missing argument at index 2
occurs.
I get these errors when starting a new shell, only on macosx :
~/.config/fish/conf.d/pisces_key_bindings.fish (line 2): switch: Expected exactly one argument, got 0
switch $fish_key_bindings
^
from sourcing file ~/.config/fish/conf.d/pisces_key_bindings.fish
called on line 305 of file /usr/local/Cellar/fish/3.0.2/share/fish/config.fish
from sourcing file /usr/local/Cellar/fish/3.0.2/share/fish/config.fish
called during startup
My dotfiles for fish are here :
https://github.com/HerveMARTIN/dotfiles/tree/master/shells/fish
I use these dotfiles on both macosx and manjaro, and these errors occurs only on macosx...
The README says:
This plugin works best with fish v2.6, because it has a feature called bracketed (a.k.a safe) paste which solves the problem with pasting strings containing paired symbols (they get autoclosed), see #6 for details.
I am now on Fish 2.7. Will this plugin work in 2.7?
This command broke circular tab completion
bind -M $_pisces_bind_mode \t _pisces_complete
See this example,
(first command pressing lot of TAB)
(second command pressiong lot of SHIFT-TAB)
https://asciinema.org/a/bShqIYrla3TCMwILAyAZShYRs
As we can see the first completion doesn't return to the beginning
I've just installed the plugin using Fisher 4.1.0 and it simply doesn't work if fish_vi_key_bindings
is set. It works perfectly when the default bindings are set, though. Is there any workaround?
Sometimes Ill autocomplete (word by word) a command such as
git commit -m "Refactor the ...
then I'll complete the message and type the closing "
Problem is the plugin will create a matching " because it doesnt detect that the earlier " is still open
Can this be fixed?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.