Use gst comand to git - ZSH

,

Hi everyone.

I’m using Manjaro with i3. And, I installed zsh. When I use git, it doesn’t allow me to use the gst command by default. The question I have is why it does not bring it by default. And on the other hand, how do I configure it?

Thanks.

Is gst an alias for git status?

I don’t believe it is a command coming with git and zsh does not source .bashrc.

You could add it to .zshrc

alias gst="git status"
1 Like

When zsh is installed, different commands are used that are shorter, for example:

gst: git status
ga: git add
gl: git pull
gp:git push

But, in Manjaro it is not working for me by default. I do not know why.

Thank you very much @linux-aarhus and the Manjaro community for answering our questions. It is a pleasure to be part of this community.

There was someone else who replied but setting the topic as resolved seems to have deleted the message.

I’m new to this forum, sorry if I do something wrong.

I am not aware that you get those aliases just be installing zsh.

At least I don’t have them - I assume you have to install and/or configure some extension to get what your refer to.

I know the manjaro-zsh-config package provides some nice git integration - but I don’t now it the shorthand gst is part of it.

gst is used to call /usr/bin/gst installed by the smalltalk package. See stackoverflow

1 Like

I have always used them in Ubuntu by default. But in Arch they don’t work. It must be as @ishaan2479 says that they can be stepped on with other commands

The git package does not contain those aliases - possibly the zsh package on Ubuntu could contain some predefined aliases but that is speculative.

The gst would conflict if GNU smalltalk is installed - also on Ubuntu - so I think this is some thirdparty configuration which has been in play.

1 Like

I consider the same. Thanks again! :smiley:

Investigating I could see that for the configurations to persist, it is necessary to modify the ~/.zshrc file. So the steps to follow are:

  1. Run the command:
    nano ~/.zshrc
  2. Create aliases with the following format:
    alias <custom-alias>=”<command>”
  3. To load the changes, start a new terminal session or source the config file using the command:
    source ~/.zshrc

That’s it!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.