c does not auto complete. #54

Closed
bendavies opened this Issue Sep 5, 2012 · 21 comments

Comments

Projects
None yet
5 participants

c works, in that it indexes and jumps to projects correctly, but it does not autocomplete.
Any ideas?

Collaborator

ndbroadbent commented Oct 16, 2012

Sorry for replying so late - are you using bash or zsh, and Linux or OS X?

Zsh. Osx.

bendavies closed this Oct 16, 2012

bendavies reopened this Oct 16, 2012

Collaborator

ndbroadbent commented Oct 16, 2012

Ah, sorry about that. I haven't been able to port the bash completion to zsh yet, since it's quite complex and uses a lot of bash-isms. I will have another look at that today and see what I can do

(See https://github.com/ndbroadbent/scm_breeze/blob/master/lib/git/repo_index.sh#L284-319 and https://github.com/ndbroadbent/scm_breeze/blob/master/lib/git/aliases.sh#L145-147)

wackou commented Oct 17, 2012

Hi, another comment about c: in repo_index.sh, you use builtin cd everywhere instead of cd, but that breaks scripts that redefined cd such as https://github.com/robbyrussell/oh-my-zsh/blob/master/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh#L34 .
Replacing builtin cd with cd seems to fix it for me, but I'm not so sure about it, maybe you were trying to prevent some other type of bugs with builtin cd?

Collaborator

ndbroadbent commented Oct 20, 2012

@wackou, good point about builtin cd. I was using builtin cd so that the scripts that iterate over all your project dirs (--batch-cmd, etc.) wouldn't have to change the environment if it was going to skip that directory anyway. But I'm going to get rid of the builtin for when you just run c <project>, since I also need to use RVM's redefined cd with .rvmrc files.

wackou commented Oct 20, 2012

great, that'll do for me. I always navigate with c anyway ;-) Thanks!

Contributor

g5pw commented Oct 23, 2012

I'm working on it, see the latest commit in my fork. Still work in progress though!

I worked out why this broke for me.
I changed my GIT_REPO_DIR to
GIT_REPO_DIR="$HOME/Code"
(note the upper case C for Code)

It worked again after a reindex.

It may be a good idea to check that GIT_REPO_DIR actually exists (case sensitive!) when installing scm breeze.
In my case, the default GIT_REPO_DIR of 'code', caused strange behaviour as my directory was actually 'Code'

Cheers.

Contributor

g5pw commented Oct 29, 2012

@bendavies That's strange, are you using a case sensitive file system (OS X default is not to use one)?

I am indeed using OS X. I have not changed any defaults so should be case insensitive.

Contributor

g5pw commented Oct 29, 2012

That's odd, are you still using zsh? 'cause there are no zsh completions for the git_index command yet...

On 29/ott/2012, at 12:34, bendavies notifications@github.com wrote:

I am indeed using OS X. I have not changed any defaults so should be case insensitive.


Reply to this email directly or view it on GitHub.

Aljaž Srebrnič


My public key: http://bit.ly/g5pw_pubkey

Yes, using zsh.

Sorry, you are absolutely correct. It doesn't work on zsh, as expected.

Contributor

g5pw commented Oct 29, 2012

Ok; I'm working on it though, take a look at g5pw/scm_breeze@a9aa363

Any updates on this ?

Collaborator

ndbroadbent commented Aug 16, 2013

@g5pw, how did you go with zsh completion?

Contributor

g5pw commented Aug 20, 2013

The commit I referenced in my previous comment implmenets basic completion, but the thing fell a little off my radar :( I'll try to improve on it a little.

Contributor

g5pw commented Aug 20, 2013

I improved on it a little, take a look at g5pw/scm_breeze@9f548c4.
Anything I should add?

Collaborator

ndbroadbent commented Sep 3, 2013

OK, looks good to me! Would you mind submitting a pull request, and I will merge that in? Thanks!

Contributor

g5pw commented Sep 10, 2013

Pull request submitted!

ndbroadbent closed this in #107 Oct 17, 2013

Collaborator

ndbroadbent commented Oct 17, 2013

Zsh tab completion merged! Sorry for the delay

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment