zsh-syntax-highlighting | Fish shell like syntax highlighting for Zsh | Command Line Interface library
kandi X-RAY | zsh-syntax-highlighting Summary
kandi X-RAY | zsh-syntax-highlighting Summary
Fish shell like syntax highlighting for Zsh.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of zsh-syntax-highlighting
zsh-syntax-highlighting Key Features
zsh-syntax-highlighting Examples and Code Snippets
Community Discussions
Trending Discussions on zsh-syntax-highlighting
QUESTION
I want to italicize my prompt (specifically the right prompt/RPROMPT) for zsh using oh-my-zsh, in iTerm2, and so far have had problems doing so. I have checked that the terminal can output and view italicized fonts with echo -e "\e[3mitalic\e[0m"
.
Things I have tried so far :
RPROMPT = '\e[3m Hello \e[0m'
: the output is a literal quote\e[3m Hello \e[0m
- from here, I tried
ANSWER
Answered 2021-Jun-05 at 08:05You can use RPROMPT=$'string with special escaping'
(See bash manual)
It may have a few issues such as the left prompt getting edited.
QUESTION
This is my full .zshrc:
...ANSWER
Answered 2021-Jun-02 at 07:14plugins
is an array used by $ZSH/oh-my-zsh.sh
. You need to initialize the former before calling the latter. Just initializing plugins
by itself doesn't do anything in Zsh (apart from creating a plain old array).
zsh-syntax-highlighting
and zsh-autosuggestions
mention explicitly in their documentation that they should be sourced after any other plugins.
Finally, if you're going to manually source
a plugin, then you do not need to add it to Oh-My-Zsh's plugins
array.
So, therefore, for your setup, this is the correct way to do things:
QUESTION
a simple summary is in the title but to further explain:
Whenever i open my terminal (iterm2) i load into zsh but completions don't seem to work, then when i manually run source .zshrc
it does fully load. I've tried moving stuff around in my .zshrc file to see if the order of loading was incorrect but it didn't fix anything.
My .zshrc file:
...ANSWER
Answered 2021-May-11 at 10:39You're making two mistakes in your .zshrc
file:
- If you do
source $ZSH/oh-my-zsh.sh
, then you shouldn't also doautoload -U compinit && compinit
, because the former includes the latter. plugins=( ... )
should be done before doingsource $ZSH/oh-my-zsh.sh
. The former does not do anything by itself.
So, change the top of your .zshrc
file to this:
QUESTION
I have a MacBook with Iterm2 with Zshell (zsh) and one of the add-ons I have is the command line fuzzy finder (fzf), but despite being added to my .zshrc it doesn't work. If I manually load it with source ~/.fzf.zsh
it works, and if I then reload my .zshrc source ~/.zshrc
it doesn't work again.
What could be the reason?
Here's most of my .zshrc file (see the line: # add fuzzy find):
...ANSWER
Answered 2021-Jan-22 at 13:46Something you do in .zshrc
following source ~/.fzf.zsh
breaks it. Make sure ~/.fzf.zsh
occurs after that, most easily accomplished by moving it to the end of the file.
QUESTION
Why is that, and how do I get all my terminal commands back?
I can't run jupyter notebook
, although I was able to open Anaconda as an application and get into it that way.
Does it have something to do with my PATH? I don't know how to get my terminal commands back, please help. I'm loving iTerm2 and OhMyZsh.
This might help: ~/.zshrc :
...ANSWER
Answered 2020-Sep-06 at 04:51I was facing a similar issue. I was able to apply the workaround and later on, Jupyter notebook worked as expected.
Alternatively, you can check the path variables as well.
QUESTION
I honestly don't remember what I last installed on my machine, I believe it was brewing gatsby-cli. Anyway, since yesterday morning my terminal has been giving me the following error when I open a new instance or reset the terminal (open a new tab, source ~/.zshrc, etc).
...ANSWER
Answered 2020-Nov-23 at 21:45Try removing the npx plugin from plugins=(...)
in .zshrc. I had the same problem and that solved it for me.
QUESTION
The current command I am using is:
...ANSWER
Answered 2020-Oct-22 at 14:18QUESTION
Whenever I start my iterm terminal. I always get this message followed by prompt on my terminal.
...ANSWER
Answered 2020-May-03 at 10:24It looks like you're trying to use plugins that are not installed. See the following documentation on how to install them:
(basically you want to clone the repos into $ZSH_CUSTOM/plugins
and source them in your .zshrc
, but see the documentation of each for actual commands to use. NOTE: zsh-syntax-highlighting
must be the last plugin sourced.)
The other part of your question is answered in your terminal output:
To fix your permissions you can do so by disabling the write permission of "group" and "others" and making sure that the owner of these directories is either root or your current user.
It looks like the owner is already your current user, however your permissions are rwxrwxr-x
, which are read, write, execute
for users and group, and read, execute
for others. From the warning message you should remove the write permission from group:
QUESTION
I have iTerm Build 3.3.9 installed. I have configured oh-my-zsh
with following plugins & themes
ANSWER
Answered 2020-Mar-21 at 08:22To fix the first issue try moving zsh-syntax-highlighting
to the very end of plugins
. From zsh-syntax-highlighting FAQ:
Why mustzsh-syntax-highlighting.zsh
be sourced at the end of the.zshrc
file?
zsh-syntax-highlighting.zsh
wraps ZLE widgets. It must be sourced after all custom widgets have been created (i.e., after allzle -N
calls and after runningcompinit
). Widgets created later will work, but will not update the syntax highlighting.
To fix the second issue add the following at the end of ~/.zshrc
:
QUESTION
Just switched to using zsh (Oh-My-Zsh) and can't get autocompletion to work. Whenever I open a new terminal (using iTerm as well as VSCode terminal), the following output is printed to the terminal:
...ANSWER
Answered 2020-Mar-05 at 23:38Somewhere you're sourcing the whole of the bash_completion project - don't. Bash completions don't work in zsh and even if they did, they are worse than the native zsh ones. bashcompinit
is only useful with individual, carefully selected and tested functions. But is still better avoided.
It isn't clear where it is being sourced. The syntax highlighting plugin is unlikely. oh-my-zsh shouldn't be doing it either but I'd try disabling it first. Also check other startup files like .zshenv
, .zlogin
, .zprofile
and system files such as /etc/zshenv
.
Also, regarding the .zshrc you quoted: there's no need to pass +X
to autoload
, that's pointless. The second assignment to the plugins array is replacing the value from the first assignment. Did you want +=
instead? And if you want $ for a a normal user in the prompt and # for root, you can do that directly with %(!.#.$)
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install zsh-syntax-highlighting
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page