37 lines
1015 B
Markdown
37 lines
1015 B
Markdown
# Aliases
|
|
|
|
Aliases in your terminal make shortcuts a lot easier when you're typing, use them properly
|
|
|
|
---
|
|
|
|
- Setting #1 : default text editor alias since my editor of choice is [BBEdit](obsidian://open?vault=Coding%20Tips&file=Computers%2FMac%20OS%20X%2FBBEdit%2FBBEdit):
|
|
|
|
``alias bbedit "open -a bbedit"``
|
|
|
|
then in the terminal type
|
|
|
|
``bbedit FILE_NAME``
|
|
|
|
Aliases within your `.bashrc` file is just endlessly useful. This [stackOverflow answer ](https://stackoverflow.com/questions/16199581/open-sublime-text-from-terminal-in-macos/19556342#19556342)gets a lot of it right.
|
|
|
|
|
|
---
|
|
|
|
### Shebang
|
|
|
|
This is a command that you often see at the top of the command but you never know what it does. This is used for every single type of Unix-like dydyem and is used to interpet an executable file. It is usually starting with `#!/` and leads to somewhere else.
|
|
|
|
Example:
|
|
```
|
|
#!/usr/bin/env sh
|
|
Hello World!
|
|
```
|
|
|
|
& you run the executable after `touch` creating one by:
|
|
```
|
|
chmod +x name_of_the_file
|
|
|
|
```
|
|
|
|
|