jimhester / per-directory-history

Per directory history for zsh, as well as global history, and the ability to toggle between them with ^G.
zlib License
251 stars 36 forks source link

Fails when the current directory is named "history" #4

Open robseed opened 10 years ago

robseed commented 10 years ago

Not a big deal, but it freaked me out the first time I saw it. Cool script, helps a lot.

➜ cleancode cd history mkdir: /Users/rseed/.directory_history/Users/rseed/cleancode/history: Not a directory ➜ history ➜ history ➜ history cd .. mkdir: /Users/rseed/.directory_history/Users/rseed/cleancode/history: Not a directory _per-directory-history-change-directory:9: locking failed for /Users/rseed/.directory_history/Users/rseed/cleancode/history/history: not a directory ➜ cleancode

jimhester commented 10 years ago

Oh that is a pretty bad one by me, I guess I have never had a history directory called history. Should be a simple fix at least, thanks for letting me know about it!

On Fri, Mar 7, 2014 at 3:22 PM, robseed notifications@github.com wrote:

Not a big deal, but it freaked me out the first time I saw it. Cool script, helps a lot.

➜ cleancode cd history mkdir: /Users/rseed/.directory_history/Users/rseed/cleancode/history: Not a directory ➜ history ➜ history ➜ history cd .. mkdir: /Users/rseed/.directory_history/Users/rseed/cleancode/history: Not a directory _per-directory-history-change-directory:9: locking failed for /Users/rseed/.directory_history/Users/rseed/cleancode/history/history: not a directory ➜ cleancode

— Reply to this email directly or view it on GitHubhttps://github.com/jimhester/per-directory-history/issues/4 .

CyberShadow commented 4 years ago

Probably this should either be configurable or each directory component should be mangled in some way to prevent colliding with the history file name.