Hacker News new | past | comments | ask | show | jobs | submit login

Please come up with reverse searches and forward searches in terminal and I swear I will change my primary OS to Windows.



PowerShell has shipped with PSReadLine since version 6.


I highly recommend using tmux. It works well with the MS terminal (and other terminals).

You'll get forward and reverse searching, split panes, windows (similar to tabs), excellent window and pane management binds (moving them, switching orders, zooming in / out, etc.), persisted sessions that you can save and restore across reboots and good mouse support if you want it.

The best part is it works the same with every terminal so you can super charge any terminal and use the same tmux configuration in multiple environments. This way you can make a terminal choice based on optimizing for speed, low key press latency and other traits that make a terminal feel nice to use.

I gave a command line talk once that focuses on using tmux, Vim and various Unix tools at https://github.com/nickjj/nyhackr-cli-dev-env. The slides and video links are listed there. The videos all have timestamps so you can jump around to the tmux bits pretty easily.


Reverse/forward searches are features of the shell, not the terminal. As others have noted, PowerShell supports those.


> searches are features of the shell, not the terminal

no, tmux/screen implement search in the terminal output buffer and work well.


Do they, though? They have their own buffer.


tmux supports this.


Tmux is not a terminal, though.


I’ve been using Ctrl+Shift+f in Windows Terminal for this (it searches terminal output/its scroll back buffer).


It's not the same: reverse/forward searches look into command history to let you relaunch commands prevously used.


Clink [https://mridgers.github.io/clink/] adds this functionality and much more to good old fashioned command prompt (which I prefer to powershell because it's much faster and simpler)


That repo is extremely outdated. Here's the official(?) supercharged fork, which is actively developed - https://github.com/chrisant996/clink


Huh, I did wonder if there was an updated fork but I obviously didn't look hard enough. Thanks!


https://mridgers.github.io/clink/ gives you readline editing in cmd.exe


Terminal features would be a footnote in the 1400 page book containing list of things I'd like to see in Windows :-)


And a 1000 of those are bugs that have been around since Windows 98.


Any example?


One simple one: If I start multiple Kopies/file downloads, Windows will run them all in parallel, even if they run through the same connection. So if after 50% there´s a connection drop, all of them will abort. This used to be especially bad on nicely defragmented disks, because the extra seeking makes parallel copies slower then sequential ones.

Even after all this time, they can`t figure out to automatically chain I/O operations (or at least give me some UI to do it explicitly).


Fuzzy history search like fzf does is in my experience quicker. And also works in Powershell.


Are you using PSFzf or something else? https://github.com/kelleyma49/PSFzf


I used to use PSFzf indeed: it's pretty good and got me started with fzf on PS, but the history reading nor file scanning are particularly fast so currently I'm using some C# code to do those and pipe it into fzf directly. Don't recall exactly but the most basic C# code I could come up with which does 'read history file in reverse and skip duplicates' was like 3 times faster than what PSFzf uses.


By reverse search do you mean this [link redacted] because you can do that with Ctrl-R now :)




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: