Shell Fish Shell, popular among terminal users, has been updated to version 4.0, which brings significant changes and improvements.
The main innovation is that Fish Shell has now been completely rewritten in the Rust programming language. However, for regular users, this transition will be virtually unnoticed: commands, settings, and typical interactions will remain the same.
Other significant changes
- New key binding system. Fish Shell 4.0 features an updated key binding system and deeper compatibility with terminals. Now, unintuitive escape sequences can be replaced with more human-readable commands, such as bind ctrl-right. With the support for the Kitty keyboard protocol, Fish can distinguish control sequences that previously seemed identical, such as bind ctrl-i, bind ctrl-I, and bind tab.
- Integration with terminal capabilities. Fish now automatically uses OSC 133 sequences for hinting and command output, which facilitates smoother synchronization with various terminals that previously relied on additional shell integration scripts.
- Improved handling of long commands. The shell now handles long command lines more gracefully, scrolling them instead of misdisplaying. Any changes made by command line bindings are immediately visible, ensuring a more intuitive user experience.
- Command history. The command history pager, first introduced in Fish 3.6, has been refined. You can now use glob syntax for more precise filtering of history entries, for example, searching using * glob syntax — git*HEAD will return everything where git and HEAD appear in that order.
- New default theme. In the new version, the default theme has been slightly altered: commands are now displayed in the 'normal' terminal color instead of the hard-to-read 'blue'. Existing users will retain their current settings unless they manually reload the theme via fish_config.
- Self-installing builds. The new self-installing builds feature could be a game changer for users who frequently work over SSH. poslužiteljima bez administratorskih privilegija. Nakon kompile Fish-a možete pokrenuti jedan samostalni binarni fajl koji izvlači sve što je potrebno — funkcije, stranice upute i čak web alat za podešavanje — u domaći direktorij.
- Isključenje komandi iz istorije. Napokon je stigla dugo čekana funkcija koja omogućava isključivanje određenih komandi iz istorije. Definiranjem korisničke funkcije fish_should_add_to_history, možete precizno odrediti koje će komande biti sačuvane.
- Poboljšanja za skriptiranje:
- string match sada podržava opciju —max-matches, koja omogućava ograničavanje broja obrađenih podudaranja;
- for petlje više neće pamtiti lokalne promenljive iz prethodne iteracije;
- set dobija opciju —no-event za suzbijanje događaja promene promenljivih;
- time počinje merenje ranije, hvatajući trajanje bilo kojih substitucija komandi pre nego što se izvrše;
- complete —erase potpuno isključuje automatsko dovršavanje za određene komande.
Izvor: linux.org.ru
