Search code examples
linuxdebianzshoh-my-zshzshrc

Why alias not working for clear command deepIn linux?


I have been using DeepIn 15.04 based on Debian 8, I installed oh-my-zsh, and created alias for 'clear' command like below:

alias clear='cls' # inside ~/.zshrc  

Now, when I reload the zsh terminal and do 'cls' then I get error as "zsh: command not found: cls"

What is the reason behind this error and what can be the possible solution. Thank you.


Solution

  • i) just google for the reason.

    ii) Put below line in ~/.zshrc:

    alias cls='clear'  
    

    and run

    exec /usr/bin/zsh  
    

    cheers !!!