|
|
Log in / Subscribe / Register

New features in the fish shell

New features in the fish shell

Posted Sep 29, 2020 19:34 UTC (Tue) by logang (subscriber, #127618)
Parent article: New features in the fish shell

I tried fish many years ago and the biggest thing I could not tolerate was the search feature described in the article. Bash has the standard Ctrl-R search which is so ingrained in my fingers that fish's lack of support for the shortcut made it unusable for me.

Also, the article is wrong about incognito mode. Bash does not add commands that begin with a space to the history and has done so for as long as I can remember. It's just not a feature that's well known -- I only found it by accident.


to post comments

New features in the fish shell

Posted Sep 29, 2020 19:44 UTC (Tue) by skx (subscriber, #14652) [Link] (3 responses)

Bash does allows you to ignore history entries that begin with a space, but you need to set the HISTCONTROL variable to ignorespace.

New features in the fish shell

Posted Sep 29, 2020 19:49 UTC (Tue) by logang (subscriber, #127618) [Link] (2 responses)

Ah, "HISTCONTROL=ignoreboth" seems to be in the default debian-based bashrc file. Perhaps other distros do not set it by default.

New features in the fish shell

Posted Sep 30, 2020 13:39 UTC (Wed) by Paf (subscriber, #91811) [Link] (1 responses)

CentOS and SLES(I think, not 100%) both do. My impression is it’s standard.

New features in the fish shell

Posted Sep 30, 2020 22:27 UTC (Wed) by sjj (guest, #2020) [Link]

At least 25 years that I can remember...

New features in the fish shell

Posted Sep 29, 2020 19:47 UTC (Tue) by jake (editor, #205) [Link] (1 responses)

> Bash does not add commands that begin with a space to the history

hmm, it does for me (add commands that start with a space to the history) ... i haven't investigated why but it is not something i (knowingly) configured ...

jake

New features in the fish shell

Posted Sep 29, 2020 19:52 UTC (Tue) by dtlin (subscriber, #36537) [Link]

It's an option, HISTCONTROL=ignorespace or HISTCONTROL=ignoreboth will not save commands starting with space to ~/.bash_history .

New features in the fish shell

Posted Sep 29, 2020 19:54 UTC (Tue) by mathstuf (subscriber, #69389) [Link] (3 responses)

Hmm. I use Ctrl+R in zsh myself. I also have Ctrl+P which does a glob to match the history (rather than literal matches). But, I also use the Up searches for history with the same starting word and I add Ctrl+Up which searches the history for entries with the same text before the cursor. They all have their uses. Did fish really not have Ctrl+R (or what I have on Ctrl+P) before?

New features in the fish shell

Posted Sep 30, 2020 12:13 UTC (Wed) by andrewsh (subscriber, #71043) [Link] (2 responses)

Fish searches through history continuously without you needing to press Ctrl+R.

New features in the fish shell

Posted Sep 30, 2020 12:35 UTC (Wed) by mathstuf (subscriber, #69389) [Link] (1 responses)

Right, but that's only prefixes IIRC? How do you search the history for commands with words in the middle?

New features in the fish shell

Posted Sep 30, 2020 14:47 UTC (Wed) by ayoisaiah (guest, #141800) [Link]

It works regardless of the position of the word in the command.

New features in the fish shell

Posted Sep 29, 2020 22:05 UTC (Tue) by gus3 (guest, #61103) [Link] (2 responses)

My .bash_profile contains "export HISTFILESIZE=0". This allows each instance of Bash to have its own history, but it isn't saved on shell exit.

New features in the fish shell

Posted Sep 29, 2020 22:25 UTC (Tue) by mattdm (subscriber, #18) [Link]

You can just unset HISTFILE to get this behavior.

New features in the fish shell

Posted Oct 3, 2020 6:33 UTC (Sat) by marcH (subscriber, #57642) [Link]

Wow, why would you _not_ want to save your history to disk?!? That's where my entire productivity comes from, together with:

"\e[B": history-search-forward
"\e[A": history-search-backward

... in /etc/inputrc.

New features in the fish shell

Posted Sep 30, 2020 1:23 UTC (Wed) by zanchey (subscriber, #94250) [Link]

There's a number of differences in philosophy between the projects, but this thread has somewhat vindicated our strong opinions on configurability.


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds