Skip to main content

Timeline for answer to Is PowerShell ready to replace my Cygwin shell on Windows? by Eric Smith

Current License: CC BY-SA 4.0

Post Revisions

10 events
when toggle format what by license comment
Nov 21, 2018 at 20:25 history edited Peter Mortensen CC BY-SA 4.0
Active reading [<https://en.wiktionary.org/wiki/a_la#Preposition>].
Feb 14, 2014 at 15:23 comment added Duncan I wasn't claiming that bit was impossible. To be honest though I would probably write a script if I wanted to repeat a bunch of commands. ISE is pretty good, but poorly documented and needs a different way of working. I only recently found Shift+Enter to enter multi-line commands (or multiple commands as a single history item). It also has snippets, intellisense, colour highlighting, debugger and so on. It doesn't have search (unless I haven't found that yet), but it does allow you to install add-ons so there may be one for that.
Feb 14, 2014 at 13:56 comment added Eric Smith @Duncan ... but despite your assertion that some things are unheard of in Linux shells: fc -e "sed -i -e 's/-1-/-2-/g' -e 's/50/51/g'" 10 255
Feb 14, 2014 at 13:24 comment added Eric Smith @Duncan, yes - good point about the ability of PS to deliver in respect of clever history tricks.
Feb 14, 2014 at 13:21 comment added Eric Smith @Duncan In respect of your comment re the shell and the console--I think that that's just a fundamental difference between Bash and PS; that is: Bash expects to deliver a certain interactive experience whereas PS "leaves" that to something else. I don't have a lot of experience with the ISE console, but from I can remember, it doesn't have a tremendously rich interactive experience either.
Feb 12, 2014 at 9:32 comment added Duncan BTW, your !! example can be written in Powershell as (h -c 1) -replace '-1-','-2-' -replace '50','51' | iex but it's easier to up arrow and edit for a single command. If you want to do it across a lot of commands I think Powershell would win. To repeat 10 commands ending at command #255 with your edits: (h -c 10 -id 255) -replace '-1-','-2-' -replace '50','51' | iex Also Powershell's history lets you do things unheard of in Linux shells; if you wonder retrospectively just how long a command took to run: h -id 20 | select { $_.EndExecutionTime - $_.StartExecutionTime }
Feb 12, 2014 at 9:17 comment added Duncan You ask "anyone know of something better than: alias | where {$_.ResolvedCommandName -eq "<command>"}?". How about just alias -Definition *property (or any other pattern)? I think the problem with your answer is that you are conflating the shell and the console: remember you have a choice of consoles with different editing options. They deliberately left the DOS console editing broken to encourage people to use other consoles such as ISE.
Dec 28, 2013 at 13:21 history edited Eric Smith CC BY-SA 3.0
Built up the case for Bash further by describing an example of how history manipulation can make the command-line and efficient means of doing things.
Nov 1, 2013 at 16:29 history edited Eric Smith CC BY-SA 3.0
Small formatting improvement.
Nov 1, 2013 at 6:12 history answered Eric Smith CC BY-SA 3.0