Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

per-directory-history breaks you-should-use #48

Open
sheafitzek opened this issue Jun 3, 2018 · 10 comments
Open

per-directory-history breaks you-should-use #48

sheafitzek opened this issue Jun 3, 2018 · 10 comments
Labels

Comments

@sheafitzek
Copy link

I'm using oh-my-zsh on Ubuntu 16.04. Whenever I enable the bundled per-directory-history plugin, you-should-use breaks. There is no output from it at all. Let me know if you need additional info.

@MichaelAquilina
Copy link
Owner

Are you on the latest version of you-should-use?
How does it break (any output on the console)?
What zsh version are you on?
Would it be possible to provide a minimal zshrc showing the breakage?

@sheafitzek
Copy link
Author

I am on ZSH v5.1.1 & you-should-use v0.4.4.
There is no output to the console from you-should-use when per-directory-history plugin is activated.

##	.zshrc	##

OS=$(uname | tr '[:upper:]' '[:lower:]')
source $HOME/git/dotfiles/bash/aliases-${OS}.bash

ZSH_THEME="powerlevel9k/powerlevel9k"

HYPHEN_INSENSITIVE="true"
ENABLE_CORRECTION="true"
COMPLETION_WAITING_DOTS="true"
ZSH_CUSTOM=$HOME/git/dotfiles/zsh/custom

plugins=(
	per-directory-history
	you-should-use
)

source $ZSH/oh-my-zsh.sh

If I comment out the per-directory-history plugin, you-should-use works as expected.

@MichaelAquilina
Copy link
Owner

Interestingly, when I enable the per-directory-history plugin it doesnt work for the first command. The next few commands that are typed are detected. Do you experience the same behaviour?

@sheafitzek
Copy link
Author

sheafitzek commented Jun 4, 2018

I just tested about 10 commands that I have aliases for, some of them multiple times, but never got any output from you-should-use with per-directory-history enabled.

@griwes
Copy link

griwes commented Aug 8, 2019

I am having the same issue; disabling per-directory-history is necessary for you-should-use to work correctly for me. Sadly, this means not using YSU for me...

I'm on Debian sid, ZSH 5.7.1, you-should-use 1.3.0.

@Guchman
Copy link

Guchman commented Apr 27, 2020

Any news? I've got same issue:(

@MichaelAquilina
Copy link
Owner

I'll try see if I can reproduce the issue at some point this week. Feel free to attempt to debug this though if you want to give a go at a PR :)

@Guchman
Copy link

Guchman commented May 10, 2020

I've tried to find out the reason and it seems that it's not the you-should-use problem itself. Prexec hook doesn't receives first argument. It's breaking on "fc -p " command at per-directory-history-addhistory() hook that installed from per-dir-history.zsh. Still didn't get the reason. Hook's documentation says that it is possible that both first and second argument will be ignored if history is not active, but I didn't completely understood what does it mean.

@Guchman
Copy link

Guchman commented May 10, 2020

There is already an issue at per-dir-history

@MichaelAquilina
Copy link
Owner

Thanks for coming back with this @Guchman, this helps a lot. I might try see if there is a workaround I can put in place for the plugin so that this works correctly.

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

No branches or pull requests

4 participants