| Commit message (Collapse) | Author | Age |
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds PowerShell support 🎉
I built this script around @lzybkr's
[prototype](https://github.com/atuinsh/atuin/issues/84#issuecomment-1689168533),
so I added him as co-author (I hope that's ok). I wouldn't know where to
start without his contribution.
I'm not a PowerShell expert, so this was a nice opportunity to learn
some stuff. I think it's ok, but I would appreciate if someone more
knowledgeable in the matter could review this though.
It would be nice if other PowerShell users could test this with their
configs and report any issues. I wouldn't be surprised if there are some
remaining bugs or missing features.
Fixes #84
## Installation
If you'd like to test this, you can install the `atuin` from this PR by
running:
```powershell
cargo install --git https://github.com/ltrzesniewski/atuin.git --branch powershell-pr
```
Then, add the following to your PowerShell profile file (whose path is
in `$PROFILE`) and restart the shell:
```powershell
atuin init powershell | Out-String | Invoke-Expression
```
This requires `atuin` to be in the path and the
[PSReadLine](https://github.com/PowerShell/PSReadLine) module to be
installed, which is the case by default.
## Tests
I tested this on the following:
- PowerShell 7.4.6 / PSReadLine 2.3.5 / Windows (the latest one)
- PowerShell 7.5.1 / PSReadLine 2.3.6 / Windows (the latest one)
- PowerShell 5.1.22621.4391 / PSReadLine 2.0.0 / Windows (the one
shipped with Windows)
- PowerShell 7.4.6 / PSReadLine 2.3.5 / Ubuntu WSL (strangely, it didn't
behave exactly like the Windows version)
- PowerShell 7.5.1 / PSReadLine 2.3.6 / Ubuntu WSL
I also tested this with and without my custom [Oh My
Posh](https://ohmyposh.dev/) prompt. It works fine in both cases,
~except that since my OMP config contains `"newline": true`, my prompt
is multiline and shifts downwards by a single line on each `atuin search
-i` invocation. This can be adjusted with the
`$env:ATUIN_POWERSHELL_PROMPT_OFFSET` environment variable (e.g. I set
mine to `-1` to account for the additional prompt line).~ (this variable
is now auto-initialized).
## Checks
- [x] I am happy for maintainers to push small adjustments to this PR,
to speed up the review cycle
- [x] I have checked that there are no existing pull requests for the
same thing
---------
Co-authored-by: Jason Shirk <jasonsh@microsoft.com>
|
| | |
|
| |
|
|
|
|
|
|
|
| |
* chore: update to rust 1.88
* clippy + fmt
* update ci version
* update flake
|
| | |
|
| |
|
|
|
|
|
|
|
| |
* chore: upgrade to 2024 edition
* ugh unsafe
* format
* nixxxxxxxxxxx why
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* test: add env ATUIN_TEST_LOCAL_TIMEOUT to control test timeout of SQLite
This make it possible to control the timeout of SQLite operations in
test. And ATUIN_TEST_LOCAL_TIMEOUT defaults to the default local_timeout,
which is actually used in the client. Instead of a small timeout (0.1),
this change makes the test less likely to fail and better imitate the
default behavior.
SQLite operation timeout was first introduced from #1590, including
connection and store timeout. The env ATUIN_TEST_SQLITE_STORE_TIMEOUT
which added by #1703 only specify the store timeout. This commit doesn't
deprecate ATUIN_TEST_SQLITE_STORE_TIMEOUT, but control it by setting its
default to the new env ATUIN_TEST_LOCAL_TIMEOUT.
* test!: replace ATUIN_TEST_SQLITE_STORE_TIMEOUT with ATUIN_TEST_LOCAL_TIMEOUT
This deprecate ATUIN_TEST_SQLITE_STORE_TIMEOUT for simplicity as the new
env ATUIN_TEST_LOCAL_TIMEOUT can control both connection and store
timeout of SQLite in test. Details see 4d88611.
Revert: #1703.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* fix(dotfiles): allow clearing aliases, disable import
At the moment there are far too many edge cases to handle importing
aliases.
1. We need an interactive shell to print aliases. Without it, most
shells won't report much.
2. Many people have their shells print things on startup (graphics,
fortunes, etc). This could be detected as an attempt to set an alias.
Rather than spend the next year finding import edge cases, I'm
disabling it for now. There's probably a better way we can do this?
* clippy
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There's a bunch of duplication here!
I'd also like to support syncing shell "snippets", aka just bits of
shell config that don't fit into the structure here. Potentially special
handling for PATH too.
Rather than come up with some abstraction in the beginning, which
inevitably will not fit future uses, I'm duplicating code _for now_.
Once all the functionality is there, I can tidy things up and sort a
proper abstraction out.
Something in atuin-client for map/list style synced structures would
probably work best.
|
| |
|
|
|
| |
* fix(dotfiles): unquote aliases before quoting
* tests
|
| |
|
| |
Serves me right for assuming fish mostly is POSIX.
|
| | |
|
| | |
|
|
|
I'd like to tidy up the root a little, and it's nice to have all the
rust crates in one place
|