A few questions about zsh

Best to add it to ~/.zshrc, if the other file gets updated it will overwrite your changes. :slight_smile:

1 Like

thanks,
since my ~/.zshrc is empty and everything seems to be in manjaro-zsh-config,
I’ll wait for a manjaro team member to clarify what should i do and which file i should edit.
i think @Chrysostomus is the one maintaining it.

manjaro-zsh-config install config in skel
if you not create new user, copy this /etc/skel/.zshrc in home
manjaro zsh config code is here

2 Likes

You could just start a terminal and then run zsh and experiment with different paths for sourcing the autosuggestions and the others.

1 Like

They have more important things to do. :slight_smile:

Are you always going to wait for the manjaro team to tell you how to use your computer? :grin:

The file /usr/share/zhs/manjaro-zsh-config is owned by the package manjaro-zsh-config, if this package gets updated it will overwrite any changes you’ve made. You can edit this file, but expect those changes to go missing eventually. :frowning:

The file ~/.zshrc is your file, no package should ever touch it. By adding the line to this file, you will have both the manjaro config and the autosuggestions, and nothing you’ve added will disappear. :slight_smile:

If you want to be cautious then you can create a backup before you make the changes.

# This will create a copy at ~/.zshrc.bak
cp -a ~/.zshrc{,.bak}

# This will restore the copy to ~/.zshrc
cp -a ~/.zshrc{.bak,}
1 Like

@papajoke
that’s the content of my /etc/skel/.zshrc

# Use powerline
USE_POWERLINE="true"
# Source manjaro-zsh-configuration
if [[ -e /usr/share/zsh/manjaro-zsh-config ]]; then
  source /usr/share/zsh/manjaro-zsh-config
fi
# Use manjaro zsh prompt
if [[ -e /usr/share/zsh/manjaro-zsh-prompt ]]; then
  source /usr/share/zsh/manjaro-zsh-prompt
fi

@mithrial
i avoided doing that suspecting it might overwrite the manjaro zsh configuration.

@dmt
this sounds like a logical reasoning and solution,i might give it a try later,
just wondering why zsh-syntax-highlighting and zsh-history-substring-search are in the manjaro config file,and not auto-suggestions.

Edit:
oh man,this is a too long thread for a simple not really important “issue”,i’m sorry :man_facepalming:

1 Like

You’d have to ask @Chrysostomus. I would guess that not everyone wants it.

It won’t unless there’s a command in the sourced file that does. The zsh modules and the manajro config won’t do this. Neither will yours since you won’t put such commands in. :slight_smile:

Also since you’re currrently using the default config. it’s very easy to restore it, as pointed out by @papajoke .

Sometimes you just have to get your feet wet. :slight_smile:

1 Like

maybe,
but since manjaro have their own implementation of zsh with configurations and all,
i think it would be a good idea they add a wiki entry explaining how to use it properly;
i looked at all the “zsh” topics i could find in this forum,some on reddit and others online,and couldn’t find simple instructions for manjaro.

on a VM of Arch, i followed the archwiki and some YouTube videos and got everything set up easily.

I agree the wiki could use some work.

If you followed it on arch then what are you waiting for? My config is built from scratch from the arch wiki, and maybe a couple of other sources that I forget. :slight_smile:

zsh is zsh, manjaro doesn’t have a special version or anything just a ready made config for you to start with. If I were you I’d just start adding stuff to ~/.zshrc.

1 Like

i tried adding and then removing source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh from my .zshrc file,but it doesn’t seem to make any difference.

apparently the autosuggestions is active by default,but it’s “based on history and completions”.
so no wonder i couldn’t get any suggestions until i started typing some commands by hand and populate the history file.(i originally thought it had some database of known commands)

i also added those lines i found under /etc/skel/.zshrc to the beginning of my .zshrc in home,and got a the fancy powerlevel10k prompt :slightly_smiling_face: :

# Use powerline
USE_POWERLINE="true"
1 Like