-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Autojump recommendations? #149
Comments
zsh4humans stores persistent directory history. It gets loaded into the builtin Shift+Up goes to the parent directory and Shift+Down goes to a subdirectory. Since there are many subdirectories, Shift+Down asks you to choose. There is also Alt+R for fzf over directory history. This is the closes thing to autojump and similar tools. In my zshrc configure things a bit differently: zstyle ':z4h:fzf-dir-history' fzf-bindings tab:repeat
zstyle ':z4h:fzf-complete' fzf-bindings tab:repeat
zstyle ':z4h:cd-down' fzf-bindings tab:repeat
z4h bindkey z4h-fzf-dir-history Shift+Down This rebinds Shift+Down to The three Note that you can undo and redo completions the same way as any other command line changes. You can find their bindings in your P.S. Unrelated but useful. Add this to z4h bindkey z4h-eof Ctrl+D
setopt ignore_eof Also install |
Sweet! This was clear enough from seeing the bindings in my
THAT'S what I was looking for. I'll try to work Alt+R into my muscle memory :) Nice choice of keys since it's similar in nature to Ctrl+R.
This is cool. How do you get back if you tab on the wrong item though? My instinct was to hit "shift tab" but it didn't work.
Nice point :)
Very cool. I don't use transient prompt though since I like to have the previous timestamps available in my backscroll. I guess iTerm2 could also do this for me, but seems easier to just have them there ready for copy/paste when needed.
Nice! I grabbed that from |
Logically, Shift+Left should do that, although Shift+Tab also makes sense. None of these currently work though. @maximbaz has been asking for this feature for a long time but I never gotten around to implementing it. Now you have to close
Try changing @@ -37,6 +37,7 @@
vcs # git status
# =========================[ Line #2 ]=========================
newline # \n
+ time # time when the command started executing (only shown in past prompts)
prompt_char # prompt symbol
)
@@ -1541,7 +1542,7 @@
# If set to true, time will update when you hit enter. This way prompts for the past
# commands will contain the start times of their commands as opposed to the default
# behavior where they contain the end times of their preceding commands.
- typeset -g POWERLEVEL9K_TIME_UPDATE_ON_COMMAND=false
+ typeset -g POWERLEVEL9K_TIME_UPDATE_ON_COMMAND=true
# Custom icon.
# typeset -g POWERLEVEL9K_TIME_VISUAL_IDENTIFIER_EXPANSION='⭐'
# Custom prefix.
@@ -1588,6 +1589,9 @@
# typed after changing current working directory.
typeset -g POWERLEVEL9K_TRANSIENT_PROMPT=off
+ function p10k-on-post-prompt() { p10k display '1|empty_line'=hide '2/left/time'=show }
+ function p10k-on-pre-prompt() { p10k display '1|empty_line'=show '2/left/time'=hide }
+
# Instant prompt mode.
#
# - off: Disable instant prompt. Choose this if you've tried instant prompt and found If you want past commands separated by empty lines, remove You can also have time in past prompts on the right instead of on the left. You can probably figure out how to achieve this. If not, ask. |
Closing because I believe I've answered all questions here. |
I noticed some comments like #35 (comment) that seem to point to something like https://github.com/rupa/z or https://github.com/wting/autojump built into z4h but it's not quite clear what that is.
I'm accustomed to using
j <first few chars>
to navigate to common locations.I noticed
z4h bindkey z4h-cd-down Shift+Down
in my config so tried shift+down but it seems to just complete based on an directory below the current cwd.For now I just brew installed autojump and added
z4h source "${HOMEBREW_PREFIX}/etc/profile.d/autojump.sh"
to my~/.zshrc
.Thanks in advance for the recommendations and really nice work on the setup!
The text was updated successfully, but these errors were encountered: