0

I am currently using Parrot Security. However, in Kali when I would issue commands in my terminal it would remember them and when I would go to type another command in my terminal that was similar it would prompt me to see if I wanted to use a previous command kind of like spell check. You can also scroll through the commands using the arrow keys. So I was just wondering if there is a way I can make my terminal in parrot do the same thing? Thanks for any help

  • shell: /bin/bash
  • Histsize=1000
  • Histfile /home/legionaire/.bash_history

I can open the bash history file and see all my commands. I just like in Kali how it comes up as you type something similar and you can scroll with the arrows.

2
  • What shell are you using? echo $SHELL. Read the man page of your shell (man ${SHELL##*/}, about "Command History". What are "`echo "HISTSIZE=$HISTSIZE, HISTFILE=$HISTFILE"? Edit your question to reply, don't reply via comment. Not saving command history could be seen as a "security feature". I'm unfamiliar with Parrot Security.
    – waltinator
    Commented Sep 20, 2021 at 0:01
  • 1
    What you're looking for is zsh-autosuggestions. Switch to zsh and install zsh-autosuggestions. Commented Sep 22, 2021 at 2:10

2 Answers 2

1

To expand on my comment, you need to change your shell to zsh and install zsh-autosuggestions. First, install zsh and git with sudo apt-get install zsh git. Next run chsh and when prompted type /bin/zsh. Thirdly type git clone https://github.com/zsh-users/zsh-autosuggestions ~/.zsh/zsh-autosuggestions to clone the zsh-autosuggestions repo. Finally type echo "source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh" >> ~/.zshrc and either type source ~/.zshrc or start a new shell after that.

0

Use a custom shell: You can change your default shell to one that provides this kind of feature: Fish shell or ZSH with the zsh-autosuggestion addon. Be aware that shells are different, changing your shell to Fish or ZSH might change some of your commands or scripts behaviour.

Search with Ctrl-R: If you can't change your shell (or if you don't want to), you can search your history using Crtl-R. This is different from the on-the-fly completion you are looking for, but can be an useful alternative. See How to cycle through reverse-i-search in BASH?.

3
  • Someone said to use CTRL-R which works however, when I reboot the PC everything that was there is gone, is there anyway I can change this
    – Rideboards
    Commented Oct 9, 2021 at 1:43
  • @Rideboards did you try following the instructions I gave? Commented Oct 13, 2021 at 22:55
  • @Grace Thompson No, I had not tried that yet. CTRL-R served my purpose until I found out that it did not remember after reboot. I will give it a try here shortly. Thank you.
    – Rideboards
    Commented Oct 17, 2021 at 21:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .