MAC / Linux terminal shortcut [closed]

1

How can I create a shortcut in the terminal? type instead of typing cd xxxx/xxxx/xxxx typing just goDevWeb ? Thanks

    
asked by anonymous 13.11.2015 / 12:20

1 answer

2

Oops!

It's like this:

On your Mac in the user folder open the .bash_profile file. It may be in the program you program in.

It is hidden. If your Finder does not show the hidden files enter the following command in the terminal:

defaults write com.apple.finder AppleShowAllFiles -bool true

Then open the .bash_profile file.

Now you create a function in the file:

goDevWeb(){
    cd xxx/yyyy/wwwww;
}

Then in the terminal in the folder usuario type so to compile the file:

source ~/.bash_profile .

Then take the test.

    
13.11.2015 / 12:30