zsh-users / fizsh

Friendly Interactive ZSHell.
Other
299 stars 18 forks source link

Changing and/or removing the welcome message? #11

Closed koesherbacon closed 7 years ago

koesherbacon commented 8 years ago

I'm having a little difficulty changing and/or removing the welcome message:

welcome to fizsh, the friendly interactive zshell
type man fizsh for instructions on how to use fizsh

Could you tell me how to go about changing it? I have already tried changing and removing it from ~/.fizsh/fizsh to no avail.

In case it makes any difference, here's what I would like it to say as a reminder to myself about my aliases:

################################################
#
# Print the welcome message
#
function _fizsh-welcome-message () {
  echo 'Fizsh - The Friendly Interactive Zsh-Shell'
  echo -e 'type \033[03;32mleaf $HOME/.fizsh/.fizshrch\033[00m or simply \033[03;32mevz\033[00m to add/remove/update aliases'
}

################################################

Thanks a lot!

~ Ev

guidovansteen commented 8 years ago

Hi Ev,

Thank you for your comment.

fizsh is usually called from the directory /usr/bin (or /usr/local/bin), which is probably on your path as well. So you could change the function _fizsh-welcome-message in the script /usr/bin/fizsh.

If you want to change ~/.fizsh/fizsh, you should call fizsh as ~/.fizsh/fizsh (instead of /usr/bin/fizsh).

You could define an alias to make sure that "fizsh" evaluates to "\~/.fizsh/fizsh". E.g. alias fizsh=~/.fizsh/fizsh

Best wishes,

Guido

katafrakt commented 8 years ago

@guidovansteen Would it be possible to completely remove welcome message, eg. with some option switch? It's kind of annoying when I try to use it as my main shell in Terminator and every time I open new pane it shows up (and returns status 1 to make things more fun :wink:).

guidovansteen commented 8 years ago

Thank you for the idea! I never cared about suppressing the welcome message in fish. That is why I never created a way to change the welcome message in fizsh either. I will provide an option in the next release. In the next release I will correct this stupid return-status bug as well.

Meanwhile you can of course edit the source code like @koesherbacon suggested.

guidovansteen commented 7 years ago

I just released version 1.0.9. Starting from this version fizsh will only provide a welcome message if called as a login shell. So fizsh -l will display the login message, whereas fizsh (without -l or --login) will not display it.