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

Autocompletion and ls alias #755

Closed
nkt opened this issue May 27, 2015 · 11 comments
Closed

Autocompletion and ls alias #755

nkt opened this issue May 27, 2015 · 11 comments
Assignees
Labels
bugs Oh no, something's broken :-( shell alias clobbering Anything dealing with users shadowing builtins with aliases or functions.

Comments

@nkt
Copy link

nkt commented May 27, 2015

I guess autocompletion for installed versions based on default ls output, so if I'm using some alias for it, I'll got completions like this:

❯ nvm use 
-rw-r--r--   1            17:54        23           5B           8            May          default      iojs-v2.0.2  nkt          staff        system       total

I guess using /bin/ls could resolve this problem.

@ljharb
Copy link
Member

ljharb commented May 27, 2015

What alias are you using?

While it's a horrible idea to clobber builtins with aliases, nvm does strive to avoid that being the source of problems.

@nkt
Copy link
Author

nkt commented May 27, 2015

alias ls='ls -FhlG'

@ljharb
Copy link
Member

ljharb commented May 27, 2015

@nkt have you sourced $NVM_DIR/bash_completion yet? nvm doesn't have autocomplete by default.

@nkt
Copy link
Author

nkt commented May 27, 2015

@ljharb I'm just installed it using brew and completed following steps:

❯ brew info nvm
==> Caveats
Add NVM's working directory to your $HOME path (if it doesn't exist):

  mkdir ~/.nvm

Copy nvm-exec to NVM's working directory

  cp $(brew --prefix nvm)/nvm-exec ~/.nvm/

Add the following to $HOME/.bashrc, $HOME/.zshrc, or your shell's
equivalent configuration file:

  export NVM_DIR=~/.nvm
  source $(brew --prefix nvm)/nvm.sh

Type `nvm help` for further information.

Bash completion has been installed to:
  /usr/local/etc/bash_completion.d

@ljharb
Copy link
Member

ljharb commented May 27, 2015

nvm is 100% unsupported when installed by brew - please don't use that to install it. However, that implies that the formula is setting up the completion.

Please install nvm using the curl command in the README.

@nkt
Copy link
Author

nkt commented May 27, 2015

@ljharb
Copy link
Member

ljharb commented May 27, 2015

yup, people do it, but that doesn't make it wise :-)

We don't use ls internally in nvm anywhere, so i'm not sure that's the issue. we do use find?

@ljharb
Copy link
Member

ljharb commented May 29, 2015

Thanks - I'm able to reproduce this locally. I'll see what I can do.

@ljharb ljharb added bugs Oh no, something's broken :-( shell alias clobbering Anything dealing with users shadowing builtins with aliases or functions. labels May 29, 2015
@ljharb ljharb self-assigned this May 29, 2015
@ljharb ljharb closed this as completed in 4c475b2 May 29, 2015
@ljharb
Copy link
Member

ljharb commented May 29, 2015

Released in v0.25.4

@nkt
Copy link
Author

nkt commented May 29, 2015

Thanks!

@ghost
Copy link

ghost commented Feb 16, 2017

thx~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugs Oh no, something's broken :-( shell alias clobbering Anything dealing with users shadowing builtins with aliases or functions.
Projects
None yet
Development

No branches or pull requests

2 participants