Score:0

I can't find my alias file

cw flag

Some time ago I created an alias which is still working

(base) Mac-mini ~ % type Iridis

Iridis is an alias for ssh ...

I want to modify this alias but when I go to nano ~/.bashrc the file is empty. Perhaps I saved it in another file? How can I find it?

hr flag
It looks like you are using zsh there not bash - have you checked `~/.zshrc` ?
Manuel Dominguez avatar
cw flag
Exactly, thanks. How do you know I am using zsh? come with Mac??
hr flag
The output of the `type` command would be slightly different in bash (`Idris is aliased to ...` and also the `%` prompt is more typical of zsh
Score:0
br flag

Macs come with Zsh shell by default, so you have to edit ~/.zshrc.

Zsh has many types of aliases. You may have to add some things for it to be:

1 - Global

alias -g <your_alias>="<your_command>"

2 - Parameterized

<alias-name>() {
    <command> $param $param2
}

3 - Suffix

alias -s <extension>="<preferred-tool>"

4 - Simple

alias <your_alias>="<commands>"

You may want to check this site too.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.