
Notifications
Clear all
Mac terminal repeating commands
Students’s Forum
3
Posts
4
Users
1
Likes
340
Views
0
18/07/2023 2:12 pm
Topic starter
How to make mac terminal to not repeat similar commands when using the up and down key.
Answer
Add a comment
Add a comment
2 Answers
1
20/07/2023 8:46 am

To prevent Mac Terminal from repeating similar commands when using the up and down arrow keys, you can modify the shell history behavior by adding the following line to your shell configuration file (such as ~/.bashrc or ~/.zshrc):
export HISTCONTROL=ignoreboth
This setting will ignore duplicate commands and commands that start with a space, preventing them from showing up when navigating through command history using the up and down arrow keys. Remember to restart your Terminal or run source ~/.bashrc (or source ~/.zshrc for Zsh) for the changes to take effect.
Add a comment
Add a comment
0
20/07/2023 6:12 am
- Open the Terminal app found in /Applications/Utilities/
- At a fresh bash prompt, hit the Escape key twice.
- You will see a message stating “Display all 1460 possibilities? ( …
- Hit the Return key to scroll through the huge list of commands available.
Add a comment
Add a comment
Forum Information
- 22 Forums
- 1,969 Topics
- 5,307 Posts
- 0 Online
- 1,282 Members
Our newest member: TimothySenue
Latest Post: Space bug using " & n b s p ; "
Forum Icons:
Forum contains no unread posts
Forum contains unread posts
Topic Icons:
Not Replied
Replied
Active
Hot
Sticky
Unapproved
Solved
Private
Closed