Comments (25)
Edit for googlers:
This is now really easy! Checkout the docs: https://atuin.sh/docs/key-binding#disable-up-arrow
I'd like to suggest you consider getting used to it though. It's possible to use a different filter mode with the up arrow - personally, I use the up arrow to filter searches for the directory, while ctrl-r searches globally.
Unfortunately at the moment it'll be a bit awkward. This is definitely something I'd like to change though!
What shell do you use? You'll basically need to rebind whatever your original history search widget was, after running the Atuin init command
If ZSH, something like this should work:
eval "$(atuin init zsh)"
bindkey "^[[A" history-beginning-search-backward # after the atuin init
and if you're using oh-my-zsh, this
eval "$(atuin init zsh)"
bindkey "^[[A" history-substring-search-up
I think for Bash you'd be good doing something like this, though I don't use Bash very much so I'm not 100% sure
eval "$(atuin init bash)"
bind '"\e[A": history-search-backward'
Ideally I'd like this to be configurable in the Atuin config file, or at the very least with environment variables! I'll see if I can sort that soon
from atuin.
Just an FYI, since this issue still turns up first on web search when looking to disable the up arrow, for anyone looking to do this, the key binding doc (updated location) https://atuin.sh/docs/key-binding has proper recipes for setting this up in zsh
, bash
, and fish
from atuin.
For anyone looking at this before fixes in the future, I've saved the output of atuin init zsh
to a file that gets loaded by sheldon and just commented out the following lines in the final function of the file:
bindkey '^[[A' _atuin_search_widget
bindkey '^[OA' _atuin_search_widget
This seems to work pretty perfectly for me. If you don't want to use sheldon, you could do something like:
atuin init zsh >> ~/.atuininit.sh
- Comment out/remove the lines as above
- Add
source ~/.atuininit.sh
to your.zshrc
from atuin.
official support, in .zshrc
, use eval "$(atuin init zsh --disable-up-arrow)"
from atuin.
Tip for those finding this on Google: if you would like to select a command without running it (similar to the default behaviour of the up arrow in the shell), then press the tab key.
from atuin.
No new files, simpler version thanks to #62:
ATUIN_NOBIND=t antibody bundle ellie/atuin # Could be any zsh plugin loader or atuin init
bindkey '^[[A' history-substring-search-up
bindkey '^r' _atuin_search_widget
from atuin.
I've updated my comment to the new doc location in case people don't make it down here...
from atuin.
Funnily enough, before we added that, people said the same thing about the opposite behaviour 🤣
Was this issue how you found out about it?
I've tried to put the "tab to edit, enter to exec" thing everywhere, but still get a tonne of people missing it. Do you have any suggestions as the where else it could go?
from atuin.
Fwiw it's currently
- At the top of the README
- At the top of the atuin window
- In the install section of the docs
- In the key controls section of the docs
Maybe a popup on first use too?
from atuin.
I found out via the issue, and I'm not surprised it's contentious. :) I was just searching trying to figure out how to edit a command, which is usually why I use up arrow, ctrl-r is (usually) for finding something I'd already ran correctly, but not always. Since these keystrokes often have years of muscle memory behind them, folks get very "i'm right!!!" about them, so it's best to just force the users to pick.
Popup on first use (like byobu does with ctrl-a, using this helper program: https://linux.die.net/man/1/byobu-ctrl-a) seems like the most usable thing. Thanks for your work!
(to be clear I'd almost say popup on first up arrow, popup on first ctrl-r, but give the user the option to pick the defaults ie 'bash like' to skip later popups and ease into atuin style later)
further parenthetical: I'm trying atuin for the history sharing/db stuff not for any UI improvements, I'm old and fine with the old ways of getting through my history, for now. :)
from atuin.
Totally makes sense, thanks for the input! Will see about a popup.
further parenthetical: I'm trying atuin for the history sharing/db stuff not for any UI improvements, I'm old and fine with the old ways of getting through my history, for now. :)
Good to hear!
from atuin.
I was just searching trying to figure out how to edit a command, which is usually why I use up arrow, ctrl-r is (usually) for finding something I'd already ran correctly, but not always.
+1 @rseymour.
The CTRL-R overlay is great, the sync is awesome, I found the TAB key by myself (didn't notice the hint though). Thanks for the work you put into this @ellie!
But I really struggle with the up-arrow keybind for two reasons:
- Most common case for up-arrow is a typo or mistake in the last command. With atuin I now have one additional keypress (TAB) before I can correct it, and a "visual interruption" with the overlay popping up briefly
- While in the up-arrow overlay I can no longer see the output of my last commands, which makes it harder to spot where the mistake in the command was without pressing TAB on a bunch of them to get out of the overlay
This is obviously very opinionated, therefore I deactivated up-arrow. It would be helpful if the bash documentation (https://docs.atuin.sh/configuration/key-binding/#bash) would say that .bashrc has to be edited for this to work. Took me a moment to figure out what to do with the docs there. Leaving this here in case anyone coming from google has to change it in bash.
Replace
eval "$(atuin init bash)"
with
export ATUIN_NOBIND="true"
eval "$(atuin init bash)"
bind -x '"\C-r": __atuin_history'
in .bashrc to disable up-arrow keybind.
from atuin.
inline_height
is perfect, thank you so much! I put it in ~/.config/atuin/config.toml
and so far that works persistent across sessions.
from atuin.
@lhl Thank you so much for mentioning this!
from atuin.
Figured this is still a part of the question, but when using eval "$(atuin init zsh --disable-up-arrow)"
in my .zshrc
, I'm getting a :
error: Found argument '--disable_up_arrow' which wasn't expected, or isn't valid in this context
(atuin 12.0.0)
I've tried
from atuin.
Just an FYI, since this issue still turns up first on web search when looking to disable the up arrow, for anyone looking to do this, the key binding doc https://github.com/ellie/atuin/blob/main/docs/key-binding.md has proper recipes for setting this up in
zsh
,bash
, andfish
Above has changed (now a dead link), new location in the web: https://atuin.sh/docs/config/key-binding
EDIT: config change from eval "$(atuin init zsh)"
to eval "$(atuin init --disable-up-arrow zsh)"
assuming you run ZSH
from atuin.
Just an FYI, since this issue still turns up first on web search when looking to disable the up arrow, for anyone looking to do this, the key binding doc https://github.com/ellie/atuin/blob/main/docs/key-binding.md has proper recipes for setting this up in
zsh
,bash
, andfish
This link is a 404
from atuin.
Just an FYI, since this issue still turns up first on web search when looking to disable the up arrow, for anyone looking to do this, the key binding doc https://github.com/ellie/atuin/blob/main/docs/key-binding.md has proper recipes for setting this up in
zsh
,bash
, andfish
This link is a 404
There's a page on our docs all about key bindings: https://atuin.sh/docs
from atuin.
The tab for enter thing was driving me mad, I had no idea how to edit the commands atuin was showing me, just rerun them. I was very close to uninstalling. the grayed out top keystrokes should be less grayed out and at the bottom where the users' eyes are. (imo)
from atuin.
While in the up-arrow overlay I can no longer see the output of my last commands, which makes it harder to spot where the mistake in the command was without pressing TAB on a bunch of them to get out of the overlay
Setting inline_height = 30
or something like that might work for you there? It stops the TUI from taking the whole screen
Otherwise, generally this section of the docs should be referred to for disabling the up arrow
https://docs.atuin.sh/configuration/key-binding/#disable-up-arrow
so
eval "$(atuin init bash --disable-up-arrow)"
That way you won't need to rebind anything yourself :)
I'll try making the docs clearer
from atuin.
Actually I tried that command first (replacing zsh with bash felt straightforward), but it didn't work for me. I didn't debug it any further though.
Thanks for the pointer to inline_height
, I will give it a go :)
from atuin.
I tried the inline height change but uninstalled completely after the eval wasn't sticky between shell instantiations. I may try again now knowing it needs to done per instance. I'd love to have a "zero messing with my UI" atuin install option, and still get the stats and sharing.
from atuin.
completely after the eval wasn't sticky between shell instantiations
what do you mean? you need to put it in your .zshrc/.bashrc/etc
I'd love to have a "zero messing with my UI" atuin install option
#798 may have what you want
from atuin.
The diff between config atuin and the shell run control file isn't clear in the docs. I thought running the eval changed an atuin config globally. The docs just say shell but not the file(s) you may want to edit to keep it persistent across sessions.
from atuin.
inline_height
is perfect, thank you so much! I put it in~/.config/atuin/config.toml
and so far that works persistent across sessions.
excellent! glad to hear it worked for you 🙏
from atuin.
Related Issues (20)
- [QUESTION] filter_mode is "directory" but zsh-autosuggestions are global HOT 6
- Atuin makes me lose control of the terminal HOT 1
- Installation fails on Ubuntu 22.04.3 LTS HOT 3
- Non cargo install fails on Alpine HOT 1
- Sync error decoding response body: expected value at line 1 column 1 HOT 2
- Unable to install using bash install command on Jetson Nano HOT 1
- preview is missing a few characters HOT 3
- Fresh install issue - error: unexpected argument '-f' found HOT 10
- Atuin won't update history after initial import. HOT 4
- tab to edit just returns blank line HOT 2
- Unable to register in atuin after installing it on mac HOT 2
- Prompt contents deleted on every keystroke using Prezto and `autosuggestions` HOT 1
- Support Windows with clink HOT 2
- Use full prefix to atuin binary in init scripts HOT 1
- Make max number of search results configurable HOT 1
- ^R/incr search keybind being overwritten by zsh-vi-mode HOT 1
- feature request: percentage heights
- Is it possible to config atuin to be 1 line inline? HOT 2
- Implement cyclic scrolling HOT 1
- Configure "Scroll offset" to show previous commands
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from atuin.