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

Unable to omz update due to unknown option --interactive in vim #9737

Closed
assist726 opened this issue Mar 16, 2021 · 14 comments
Closed

Unable to omz update due to unknown option --interactive in vim #9737

assist726 opened this issue Mar 16, 2021 · 14 comments
Labels
Resolution: not our issue Issue or pull request not related to Oh My Zsh Support Request for support Topic: alias Pull Request or issue regarding aliases

Comments

@assist726
Copy link

❯ omz update
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Jan  4 2021 19:10:05)
Unknown option argument: "--interactive"
More info with: "vim -h"

I am on the latest version of vim installed from homebrew on MacOS but unclear why the --interactive option is unknown. Did previously have success running omz update on older versions of Vim

@assist726 assist726 added the Support Request for support label Mar 16, 2021
@mcornella
Copy link
Member

Can you provide more information about how you're running it? vim shouldn't have anything to do with omz update. Are you running this from inside vim?

@toienMT
Copy link

toienMT commented Jan 20, 2022

I'm getting the same error. I'm running it in my iTerm window.

image

@mcornella
Copy link
Member

Can you provide a reproducible case as to how you run omz update? Is this run inside vim, or just on a normal terminal session?

@toienMT
Copy link

toienMT commented Jan 20, 2022

Just right in the terminal.

  • Open terminal
  • enter omz update or oh my zsh asks to update and get it too.
  • get error

@mcornella
Copy link
Member

Can you run functions -t _omz::update, and then try omz update, so it generates a trace, and post it here so I can take a look?

@mcornella mcornella reopened this Jan 22, 2022
@toienMT
Copy link

toienMT commented Jan 24, 2022

▶ omz update
+_omz::update:1> cd /Users/toien/.oh-my-zsh
+_omz::update:1> git rev-parse HEAD
+_omz::update:1> local last_commit=fe04acd97ccf60b869eb105d8b76fbfed607a90a
+_omz::update:4> [[ '' != --unattended ]]
+_omz::update:5> ZSH=/Users/toien/.oh-my-zsh vi /Users/toien/.zshrc -f /Users/toien/.oh-my-zsh/tools/upgrade.sh --interactive
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Aug 30 2021 06:51:40)
Unknown option argument: "--interactive"
More info with: "vim -h"
+_omz::update:5> return 1

@mcornella
Copy link
Member

Have you aliased zsh to vi ~/.zshrc?

@mcornella mcornella added Resolution: not our issue Issue or pull request not related to Oh My Zsh Topic: alias Pull Request or issue regarding aliases labels Jan 24, 2022
@toienMT
Copy link

toienMT commented Jan 24, 2022

Yes, I have created alias for

  • zsh='vi ~/.zshrc'
  • szsh='source ~/.zshrc'

Do I have to remove the alias for now?

@mcornella
Copy link
Member

I've updated the CLI functions to use command zsh so the alias is not triggered. Even so, using the name zsh for the alias is a very bad choice and will bring you many other problems in the future. I'd suggest using zshrc instead.

Also, do not use source ~/.zshrc since it can have side-effects. Instead use exec zsh or omz reload.

@toienMT
Copy link

toienMT commented Jan 24, 2022

ok thank you very much. Are exec zsh and omz reload build in to reload the ~/.zshrc file?

@mcornella
Copy link
Member

Exactly that yes. Use omz reload for extra protection.

@toienMT
Copy link

toienMT commented Jan 24, 2022

Thanks just ran omz reload and it worked. I did removed the 2 alias from my ~/.zshrc file.

Do you have a better way to bring up the zsh file? Or just do it the long way of typing out vi ~/.zshrc?

@mcornella
Copy link
Member

You can rename the alias to something different than zsh. zshrc is a good alternative.

lesterchan added a commit to lesterchan/oh-my-zsh that referenced this issue Feb 5, 2022
* upstream/master: (41 commits)
  Introducing the ANSI logo graphic
  feat(yarn): add setting to disable adding global dir to `$PATH` (ohmyzsh#10642)
  fix(cli): allow `omz` commands to be used in a script (ohmyzsh#10645)
  feat(multipass): add plugin for multipass (ohmyzsh#10140)
  refactor(zsh_reload)!: remove deprecated plugin
  chore: update copyright year
  refactor(django): remove deprecated `django` plugin
  style(init): use consistent code style in init script (ohmyzsh#10601)
  refactor(installer): use POSIX-standard's `id -u -n` to define `$USER`
  chore(1password): fix comments to follow code (ohmyzsh#10634)
  fix(gitfast): update to git-completion 1.3.6 (ohmyzsh#10633)
  fix(changelog): don't show changelog with only ignored type commits
  style(rkj-repos): change `white` to `default` to support light color schemes (ohmyzsh#6195)
  fix(tmux): use `$ZSH_TMUX_CONFIG` setting in tmuxconf alias
  fix(ys): fix `$VIRTUAL_ENV` check if `nounset` is enabled (ohmyzsh#9915)
  fix(installer): avoid `git clone -c` to support git v1.7.1 (ohmyzsh#10621)
  fix(npx)!: detect new `npx` versions and fail gracefully (ohmyzsh#10452)
  style(updater): silence `git pull` output and show errors in English
  feat(postgres): support Homebrew for Apple Silicon (ohmyzsh#10618)
  fix(cli): make sure to run `zsh` command if an alias exists (ohmyzsh#9737)
  ...
amkirby pushed a commit to amkirby/oh-my-zsh that referenced this issue Mar 9, 2022
cmoore pushed a commit to cmoore/oh-my-zsh that referenced this issue Apr 28, 2022
FelixDombek pushed a commit to FelixDombek/ohmyzsh that referenced this issue May 18, 2022
Daddelhai pushed a commit to Daddelhai/ohmyzsh that referenced this issue Jul 4, 2022
kis87988 pushed a commit to kis87988/ohmyzsh that referenced this issue Jul 5, 2022
tekniklr pushed a commit to tekniklr/oh-my-zsh that referenced this issue Sep 6, 2022
rahdjoudj pushed a commit to rahdjoudj/ohmyzsh that referenced this issue Nov 3, 2022
@assist726
Copy link
Author

You can rename the alias to something different than zsh. zshrc is a good alternative.

Thanks indeed it was due to the alias, all good now!

dilfish pushed a commit to dilfish/oh-my-zsh that referenced this issue Feb 16, 2023
nbaronov pushed a commit to nbaronov/oh-my-zsh that referenced this issue Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: not our issue Issue or pull request not related to Oh My Zsh Support Request for support Topic: alias Pull Request or issue regarding aliases
Projects
None yet
Development

No branches or pull requests

3 participants