-
Notifications
You must be signed in to change notification settings - Fork 456
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
General Question/Azure-cli #21
Comments
usually, cli tools will add something to your shell rc file as part of the install process--and it looks like it did do something of that sort since your shell is trying to load /Users/devworx/lib/azure-cli/az.completion when you open a new tab. It looks like this may be a bug in the azure-cli with support for the version of zsh that you have installed: Azure/azure-cli#1722
|
I checked the version and its correct. So from your answer, you would expect that a new npm install would get you access to an executable without having to do anything else. It doesnt seem to be working so smoothly for me. |
I wouldn't expect this to be an npm issue--the azure cli is outside of npm. The problem points to this line: https://github.com/Azure/azure-cli/blob/1271aa0cad486b8c61cc788c912f3e87092bb104/packaged_releases/az.completion#L21 The Did you try adding: |
:tldr @atomantic is a generous genius. In this specific case it looks like this. This worked successfully.
azure-cli directory: '/Users/devworx/lib/azure-cli'
===> In what directory would you like to place the 'az' executable? (leave blank to use '/Users/devworx/bin'): //left blank
===> Enter a path to an rc file to update (leave blank to use '/Users/devworx/.bash_profile'):
//entered path to .zshrc
/Users/devworx/.zshrc
//output
-- Backed up '/Users/devworx/.dotfiles/homedir/.zshrc' to '/Users/devworx/.dotfiles/homedir/.zshrc.backup'
-- Tab completion set up complete.
-- If tab completion is not activated, verify that '/Users/devworx/.dotfiles/homedir/.zshrc' is sourced by your shell.
--
-- ** Run `exec -l $SHELL` to restart your shell. **
--
-- Installation successful.
-- Run the CLI with /Users/devworx/bin/az --help This is the newly generated .zshrc
Running Use the Force, Luke.
/Users/devworx/lib/azure-cli/az.completion:10: command not found: complete Then followed your instruction adding 'autoload bashcompinit && bashcompinit '(even though i have no idea what that is, will research) ~ nvim ~/.zshrc 127 ↵ 1096 10:06:18
...
autoload bashcompinit && bashcompinit
source '/Users/devworx/lib/azure-cli/az.completion'
....
~ exec -l $SHELL Then run az ✓ 1099 10:08:29
/\
/ \ _____ _ _ __ ___
/ /\ \ |_ / | | | \'__/ _ \
/ ____ \ / /| |_| | | | __/
/_/ \_\/___|\__,_|_| \___|
Welcome to the cool new Azure CLI!
Here are the base commands:
account : Manage subscriptions.
.... I figured I would leave this here in case it helps anyone else. Thus the details... |
So @atomantic, I very much appreciate you sharing this. Clearly you have a helpful soul. I'm trying to dig into this and understand how to get control of my mac for dev. I have installed azure-cli with this script. I then get this error
/Users/devworx/lib/azure-cli/az.completion:10: command not found: complete
, screenshot:This azure-cli issue suggests a method to correct this error however, I am trying understand how you would do it. My first thought is to add it to ~./shellpaths. More generally, is there a built in script for adding new items installed via curl to the path? If not how would you do it. Thank you.
The text was updated successfully, but these errors were encountered: