atuin icon indicating copy to clipboard operation
atuin copied to clipboard

Powershell Support

Open Kixiron opened this issue 3 years ago • 8 comments

I absolutely love the project and would love to be able to use it within powershell

Kixiron avatar May 09 '21 17:05 Kixiron

Any news on PowerShell support?

gabriel-vanca avatar Jul 20 '23 22:07 gabriel-vanca

@ellie and I are not against getting some basic powershell support, but neither of us run powershell or have the time right now to get familiar.

We have started to partially and unofficially support windows builds now, so it'll be the powershell integration that needs investigating.

  1. how can you hook into the prompt and detect key bindings
  2. how can you monitor command start and end events
  3. how can you update the prompt line with the search selection

conradludgate avatar Jul 21 '23 05:07 conradludgate

Might be worth noting that Powershell is not a windows-only shell. I use it on my Linux machines and it's available for OSX as well.

stibinator avatar Aug 15 '23 01:08 stibinator

I've been playing around with PowerShell support, see my prototype - you can import this file from your profile.

This mostly works for adding and updating the history. It's not perfect, e.g. it will include the time to render the prompt, which can be non-trivial in some cases.

I couldn't find a clean way to use redirection to capture the result from an interactive search, so I resorted to using a temporary file. It feels pretty slow on my VM but it seems to work.

One other thing I think PowerShell needs that doesn't apply to any other currently supported shell. PowerShell's notion of the current directory goes beyond the filesystem. atuin should have an explicit parameter like atuin history --cwd hklm:\ -- ... so PowerShell can specify these non-filesystem paths.

lzybkr avatar Aug 23 '23 02:08 lzybkr

@ellie and I are not against getting some basic powershell support, but neither of us run powershell or have the time right now to get familiar.

We have started to partially and unofficially support windows builds now, so it'll be the powershell integration that needs investigating.

1. how can you hook into the prompt and detect key bindings

2. how can you monitor command start and end events

3. how can you update the prompt line with the search selection

https://github.com/kelleyma49/PSFzf

brian6932 avatar Sep 27 '23 10:09 brian6932

This issue has been mentioned on Atuin Community. There might be relevant details there:

https://forum.atuin.sh/t/terminal-setup/165/2

atuin-bot avatar Feb 13 '24 13:02 atuin-bot