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

"returned 1" and doesn't copy #1

Closed
timtyrrell opened this issue Jul 22, 2021 · 8 comments
Closed

"returned 1" and doesn't copy #1

timtyrrell opened this issue Jul 22, 2021 · 8 comments

Comments

@timtyrrell
Copy link

Great looking plugin! I gave it a spin and FZF pulls up fine but when I hit "enter" on a line I get the below message and it doesn't seem to copy. Can I provide any more info?

[my machine]/.tmux/plugins/tmux-fuzzback/scripts/fuzzback.sh' returned 1

@roosta
Copy link
Owner

roosta commented Jul 22, 2021

Hi! thanks for giving tmux-fuzzback a go :) I'm not entirely sure why it would error out, but fuzzback doesn't actually do any coping, it just moves you to the match so that you can copy whatever you like in tmux copy mode.

Does the script move you to the correct line? I'd like to reproduce the problem, but I'm uncertain what your setup is like, could you provide the tmux version, and fzf version for starters?

@timtyrrell
Copy link
Author

Ah, I assumed incorrectly, my bad.

@roosta
Copy link
Owner

roosta commented Jul 22, 2021

No worries :) Hope you have a good time. Let me know if I can help with anything at all

@roosta
Copy link
Owner

roosta commented Jul 22, 2021

Closed issue and all, but I worry a bit about the exit status you mentioned. Could you try and run the script from the repo folder

cd ~/.tmux/plugins/tmux-fuzzback # or wherever you store the plugin
./scripts/fuzzback.sh

That should print out an error message pointing to where in the script the issue originates.

@timtyrrell
Copy link
Author

When I run it there it triggers fzf then when I hit "enter", which I shouldn't do but wanted the error, I get:

❯ ./scripts/fuzzback.sh
./scripts/fuzzback.sh: line 256: readarray: command not found
./scripts/fuzzback.sh: line 258: match[1]: unbound variable

My settings: https://github.com/timtyrrell/dotfiles/blob/main/.zshrc#L266-L297

@roosta
Copy link
Owner

roosta commented Jul 22, 2021

Think I know a fix, hang on

roosta added a commit that referenced this issue Jul 22, 2021
@roosta
Copy link
Owner

roosta commented Jul 22, 2021

Ok, think you shouldn't exit when you hit enter now.

@roosta
Copy link
Owner

roosta commented Jul 22, 2021

fuzzback is supposed to move you to the line in question, so that you can copy whatever you like when fuzzback puts you in tmux copy mode. I don't think this has worked for you up until now, but it should now...hopefully :)

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

No branches or pull requests

2 participants