News for hackers. Stuff that matters.
Re:PowerShell is open sourced and is available on Linux by ldiracdelta on Thursday August 18, 2016 @12:09PM (#12313661)
If you put this in your `~/.inputrc` [1]:

    "\e[A": history-search-backward
    "\e[B": history-search-forward
    "\e[C": forward-char
    "\e[D": backward-char
  
you can start typing a previous command and go up through your history for all commands starting with whatever you currently have typed into the bash shell. Reset the scrolling through the history with `ctrl+c`.

Personally, I hate that powershell remembers your position in the shell history. I don't want to maintain a mental model of the shell history rollodex and where I am in it. That's one less part of my brain that I can't use for thinking about the code. If I have a set of commands to type over and over:

    history 20 | head -10 | sed -r 's/^ *[0-9]+ *//g;' > new_script.bash

* [1] http://codeinthehole.com/writing/the-most-important-command-...
Re:PowerShell is open sourced and is available on Linux by lottin on Thursday August 18, 2016 @03:14PM (#12315504)
Exactly, but it makes more sense to bind history-search-backward and history-search-forward to <M-p> and <M-n> in my opinion.
Re:PowerShell is open sourced and is available on Linux by voltagex_ on Friday August 19, 2016 @08:35AM (#12319565)
The search by previous characters seems to be the default behaviour of FreeBSD's t/csh. Confused the hell out of me at first because Ctrl+R isn't reverse search.
Re:PowerShell is open sourced and is available on Linux by larrik on Thursday August 18, 2016 @01:05PM (#12314300)
I think I tried something like this once before, and it broke something else. I can't remember what that was, so I'm totally trying this.
Re:PowerShell is open sourced and is available on Linux by larrik on Thursday August 18, 2016 @02:10PM (#12314958)
Yeah, this breaks the "move over by word" with Ctrl+Left and Ctrl+Right which I use a lot. Maybe I need to add them explicitly.
Re:PowerShell is open sourced and is available on Linux by ldiracdelta on Thursday August 18, 2016 @03:05PM (#12315423)
Ah. I use the standard emac'esque commands to move over by word. alt+b for back word, alt+f for forward word. Not at all intuitive... windows line movement commands win over emacs bindings form an intuitive perspective.

Also you don't need these to get up/down to work:

    "\e[C": forward-char
    "\e[D": backward-char
Those are for left/right arrows.