xav-b / zsh-extend-history

Zsh plugin to record command history with more context
9 stars 1 forks source link

Error when git repository doesn't have remote #2

Open Alveel opened 12 months ago

Alveel commented 12 months ago

https://github.com/xav-b/zsh-extend-history/blob/c273d1ca43f3d2956eec03d2315061ae380486bb/extend-history.plugin.zsh#L32

I kept getting the follow error:

basename: missing operand
Try 'basename --help' for more information.

Eventually I sourced it to above line. It happens if I'm working in a git repository that doesn't (yet) have a remote configured. Perhaps we can make a test if the result of the git config command is empty and skip the record step?

abelcha commented 9 months ago

same issue, I've fixed it in this pr: https://github.com/xav-b/zsh-extend-history/pull/3