You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/05-building-your-toolkit/24-configuring-the-shell/index.md
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -96,6 +96,15 @@ alias gocode='cd ~/repos/github/dwmkerr'
96
96
97
97
If you are not familiar with aliases, check [Chapter 10 - Understanding Commands](../../part-2-core-skills/understanding-commands).
98
98
99
+
You might also use aliases to change the behaviour of existing commands. For example, we can change the `rm` command to automatically ask for confirmation before a file is deleted:
100
+
101
+
```bash
102
+
# Always run 'rm' in interactive mode.
103
+
alias rm='rm -i'
104
+
```
105
+
106
+
Be aware that the more you customise default commands the more that you run the risk that tutorials or samples you use may not work as expected, as those samples will expect the _default_ behaviour of the command.
107
+
99
108
#### Functions
100
109
101
110
If you have more complex operations that you regularly perform, you could add them to your _~/.bashrc_ as a function:
0 commit comments