Comments (9)
Ohh gotcha, thanks for such a great explanation. I might have to work with kitty_mod+h for now :)
Thanks @mikesmithgh once again, I hope we see a great tmux support soon
Yeah you can close this issue!
from kitty-scrollback.nvim.
Hey @mikesmithgh, here are the details
Nvim version: 0.9.5
Kitty version: 0.32.1
I restarted the mac to see if that helps and it worked. Now kitty_mod + h is working but with g it's not. What might be the issue here?
Screen.Recording.2024-02-22.at.3.50.57.AM.mov
from kitty-scrollback.nvim.
Screen.Recording.2024-02-22.at.7.01.23.PM.mov
Hey @mikesmithgh , I tried with mod+g here still the result is same
I think the last command output is working but triggering with mod+g is not
from kitty-scrollback.nvim.
Hey, thanks for reporting. The config looks good to me, could you answer the following questions?
- what version of Neovim are you using?
- what version of Kitty are you using?
- Could you please try the following commands in Neovim and provide the output.
- You may need to expand the fold after :checkhealth (.e.g, type
zR
in normal mode)
- You may need to expand the fold after :checkhealth (.e.g, type
:=require('kitty-scrollback').setup()
:checkhealth kitty-scrollback
- Could you try
kitty_mod+h
and post a screenshot?
from kitty-scrollback.nvim.
@restacksyj awesome
kitty_mod+g
is equivalent to kitty @ get-text --extent=last_cmd_output.
last_cmd_output means the output of the last command that was run in the window.
Watching your video, I see previous commands but no resulting output of those commands.
Could you try:
- Run the command
ls
in Kitty - Press
kitty_mod+g
This should open the results of the ls command in kitty-scrollback.nvim.
This should be the same as running the command:
ls; kitty @ get-text --extent=last_cmd_output
Demo:
ksb-demo-modg.mov
Please let me know if that works
from kitty-scrollback.nvim.
Hey @mikesmithgh , I tried with mod+g here still the result is same
I think the last command output is working but triggering with mod+g is not
It looks like kitty @ get-text --extent=last_cmd_output
isn't working as expected for you. I would have expected it to repeat your ls output. I see you are using fish, I use bash so that may be why we are seeing a difference.
Could you provide the output of
:KittyScrollbackCheckHealth
?
I'll test with fish later today. Most likely this is an upstream bug, but I'd like to try and reproduce on my side.
from kitty-scrollback.nvim.
@restacksyj I am having trouble reproducing the issue.
Could you do the following to help me troubleshoot:
- Provide the output of
:KittyScrollbackCheckHealth
- Provide the version of fish
fish --version
- change the shell to bash or zsh and test
- update the line in your kitty.conf to
shell bash
orshell zsh
- completely close kitty
- Reattempt:
- Run the command
ls -la
in Kitty - Press
kitty_mod+g
- close kitty-scrollback.nvim
- Run the command
ls -la; kitty @ get-text --extent=last_cmd_output
- Run the command
- If this is successful, then it is a fish/kitty specific issue
- update the line in your kitty.conf to
from kitty-scrollback.nvim.
Hey @mikesmithgh
: KittyScrollbackCheckHealth
output
==============================================================================
kitty-scrollback: require("kitty-scrollback.health").check()
kitty-scrollback: Neovim version 0.9+ ~
- OK NVIM 0.9.5
- If you are using a version of nvim that is less than 0.10, then formatting on this checkhealth may be malformed
kitty-scrollback: kitty-scrollback.nvim version ~
- OK `|`\___/`|` *kitty-scrollback.nvim* @ `93b4286`
=) `^`Y`^` (=
\ *^* / If you have any issues or questions using *kitty-scrollback.nvim* then
` )=*=( ` please create an issue at
/ \ https://github.com/mikesmithgh/kitty-scrollback.nvim/issues and
| | provide the `KittyScrollbackCheckHealth` report.
/| | | |\
\| | `|`_`|`/\
/_// ___/ *Bonus* *points* *for* *cat* *memes*
\_)
kitty-scrollback: Kitty remote control ~
- OK `kitty @ ls` exited with code *0*
kitty-scrollback: Kitty data ~
- OK Kitty data available
>lua
{
columns = 124,
cursor_x = 1,
cursor_y = 38,
kitty_config_dir = "/Users/restacksyj/.config/kitty",
kitty_opts = {
allow_remote_control = "yes",
listen_on = "unix:/tmp/kitty",
scrollback_fill_enlarged_window = false,
scrollback_lines = 2000,
scrollback_pager = { "less", "--chop-long-lines", "--RAW-CONTROL-CHARS", "+INPUT_LINE_NUMBER" },
scrollback_pager_history_size = 0,
shell_integration = { "enabled" }
},
kitty_path = "/Applications/kitty.app/Contents/MacOS/kitty",
kitty_scrollback_config = "ksb_builtin_checkhealth",
kitty_version = { 0, 32, 1 },
ksb_dir = "/Users/restacksyj/.local/share/nvim/lazy/kitty-scrollback.nvim",
lines = 40,
scrolled_by = 0,
tmux = vim.empty_dict(),
window_id = 1,
window_title = "zsh"
}
kitty-scrollback: Kitty version 0.29+ ~
- OK kitty 0.32.1
kitty-scrollback: clipboard ~
- OK Clipboard tool found: *pbcopy*
kitty-scrollback: sed ~
- OK `sed -E -e s/\r//g -e s/$/\x1b[0m/g` exited with code *0* and stdout `expected�[0m`
`sed: /usr/bin/sed`
kitty-scrollback: Kitty debug config ~
- OK kitty 0.32.1 (08d88af2fb) created by Kovid Goyal
Darwin yash-macbook-pro 23.2.0 Darwin Kernel Version 23.2.0: Wed Nov 15 21:54:10 PST 2023; root:xnu-10002.61.3~2/RELEASE_X86_64 x86_64
ProductName: macOS ProductVersion: 14.2.1 BuildVersion: 23C71
`Frozen:` True
`Paths: kitty:` /Applications/kitty.app/Contents/MacOS/kitty
` base dir:` /Applications/kitty.app/Contents/Resources/kitty
` extensions dir:` /Applications/kitty.app/Contents/Resources/Python/lib/kitty-extensions
` system shell:` /bin/zsh
`Loaded config files:`
/Users/restacksyj/.config/kitty/kitty.conf
Config options different from defaults:
allow_remote_control yes
cursor_beam_thickness 5.0
dynamic_background_opacity True
font_family Berkeley Mono
font_size 22.0
hide_window_decorations 2
initial_window_height (40, 'cells')
initial_window_width (110, 'cells')
kitty_mod cmd
listen_on unix:/tmp/kitty
paste_actions frozenset({'confirm-if-large'})
shell fish
sync_to_monitor False
`Changed mouse actions:`
ctrl+shift+right press ungrabbed → combine : mouse_select_command_output : kitty_scrollback_nvim --config ksb_builtin_last_visited_cmd_output
`Added shortcuts:`
ctrl+enter → send_text normal,application \x1b[13;5u
f5 → load_config ~/.config/kitty/kitty.conf
shift+enter → send_text normal,application \x1b[13;2u
`Removed shortcuts:`
cmd++ → change_font_size all +2.0
cmd+, → edit_config_file
cmd+- → change_font_size all -2.0
cmd+0 → change_font_size all 0
cmd+1 → first_window
cmd+2 → second_window
cmd+3 → third_window
cmd+4 → fourth_window
cmd+5 → fifth_window
cmd+6 → sixth_window
cmd+7 → seventh_window
cmd+8 → eighth_window
cmd+9 → ninth_window
cmd+= → change_font_size all +2.0
cmd+c → copy_to_clipboard
cmd+down → scroll_line_down
cmd+end → scroll_end
cmd+enter → new_window
cmd+h → hide_macos_app
cmd+home → scroll_home
cmd+k → clear_terminal to_cursor active
cmd+m → minimize_macos_window
cmd+n → new_os_window
cmd+page_down → scroll_page_down
cmd+page_up → scroll_page_up
cmd+q → quit
cmd+r → start_resizing_window
cmd+t → new_tab
cmd+up → scroll_line_up
cmd+v → paste_from_clipboard
cmd+w → close_tab
ctrl+cmd+, → load_config_file
ctrl+cmd+f → toggle_fullscreen
kitty_mod+enter → new_window
kitty_mod+f2 → edit_config_file
kitty_mod+k → scroll_line_up
kitty_mod+n → new_os_window
kitty_mod+q → close_tab
kitty_mod+t → new_tab
kitty_mod+w → close_window
opt+cmd+h → hide_macos_other_apps
opt+cmd+r → clear_terminal reset active
opt+cmd+s → toggle_macos_secure_keyboard_entry
shift+cmd+/ → open_url https://sw.kovidgoyal.net/kitty/
shift+cmd+[ → previous_tab
shift+cmd+] → next_tab
shift+cmd+d → close_window
shift+cmd+w → close_os_window
`Changed shortcuts:`
ctrl+shift+tab → send_text normal,application \x1b[9;6u
ctrl+tab → send_text normal,application \x1b[9;5u
kitty_mod+, → edit_config_file
kitty_mod+0 → change_font_size all 0
kitty_mod+g → kitty_scrollback_nvim --config ksb_builtin_last_cmd_output
kitty_mod+h → kitty_scrollback_nvim
`Colors`:
active_tab_background #26233a
active_tab_foreground #e0def4
background #191724
color0 #26233a
color1 #eb6f92
color10 #31748f
color11 #f6c177
color12 #9ccfd8
color13 #c4a7e7
color14 #ebbcba
color15 #e0def4
color2 #31748f
color3 #f6c177
color4 #9ccfd8
color5 #c4a7e7
color6 #ebbcba
color7 #e0def4
color8 #6e6a86
color9 #eb6f92
cursor #524f67
cursor_text_color #e0def4
foreground #e0def4
inactive_tab_background #191724
inactive_tab_foreground #6e6a86
selection_background #403d52
selection_foreground #e0def4
url_color #c4a7e7
`Important environment variables seen by the kitty process:`
PATH `/Applications/kitty.app/Contents/MacOS:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin`
LANG `en_US.UTF-8`
SHELL `/bin/zsh`
USER `restacksyj`
- fish version
3.7.0
- changed shell to zsh from fish ( Now both kitty_mod+g and kitty_mod+h is working)
So, I was trying all of this inside tmux. Trying it without tmux and fish shell kitty_mod g and h are working
Details in the video
Screen.Recording.2024-02-23.at.9.04.01.PM.mov
Seems like a tmux issue?
In tmux, kitty listen_on is listening to /tmp/kitty-806 instead of /tmp/kitty
from kitty-scrollback.nvim.
So, I was trying all of this inside tmux. Trying it without tmux and fish shell kitty_mod g and h are working
🤦 ahhh I should have caught that in the video. I'm used to seeing the bright green status from tmux 😂
That makes total sense.
This is not a bug, it is expected behavior. When Kitty has shell-integration enabled, it adds prompt marks to the beginning and end of the prompts. See shell-integration no-prompt-mark
no-prompt-mark Turn off marking of prompts. This disables jumping to prompt, browsing output of last command and click to move cursor functionality.
tmux has its own pty, basically its own session that Kitty has no knowledge of. So in this case, when you have tmux open, Kitty can no longer add those prompt marks. So when you hit kitty_mod+g
it attempts to get the last command output, but there are no prompt marks to determine that value. Resulting in the empty response/blank screen.
To demonstrate this, you can also do kitty_mod+h
when tmux is open, then try to scroll to the top of the history (or press gg
in Normal mode). If you are in tmux, it only shows the current screen and does not have access to the history.
I currently have experimental support for tmux to see the entire history. See tmux experimental. With this is setup you can use the tmux key binding (defaults to <ctrl-b>[
) to open the entire tmux scrollback buffer history in kitty-scrollback.nvim.
tmux does not offer the ability to capture the last command output out of the box (that I am aware of). So, as of now, kitty-scrollback.nvim won't be able to do that. It does look like there is a plugin tmux_capture_last_command_output that captures it based on a regex of your PS1 which I could look into possibility integrating after tmux support is considered stable.
FYI there are some other Kitty features that may not play friendly with Kitty according to the Kitty FAQ tmux i-am-using-tmux-and-have-a-problem.
Thanks for all the videos and troubleshooting steps, it was really helpful 👍. I'll plan to close this issue out unless you have any other questions/concerns.
from kitty-scrollback.nvim.
Related Issues (20)
- bug: very small window causes E49: Invalid scroll size HOT 1
- bug: failure to open over kitten ssh HOT 4
- chore: add tests for ssh connections HOT 2
- chore: investigate flaky test failure with incorrect git branch HOT 1
- test: track and fix flaky CI tests HOT 2
- chore: kitty release 0.34.0 update test matrix HOT 1
- fix: fails to open over kitten ssh split window HOT 1
- feat: add nvim-terminal.lua integration
- bug: failed to launch child: nvim HOT 9
- Installation instructions HOT 1
- Bug: scrollback editing freezes when used with with auto-session HOT 1
- feat: replace ps1 prompt HOT 5
- feat: make the current cmdline editable in place HOT 7
- ci: update Neovim test matrix for v0.10 release HOT 1
- bug: ksb_builtin_last_visited_cmd_output doesn't capture everything HOT 5
- bug: executing command causing autocomplete in fish shell HOT 1
- Buffer opens up with modifiable set to false HOT 1
- bug: incorrect filetype for paste window HOT 1
- feat: add ability to have scrollback window and paste window open at the same time HOT 1
- bug: error vim.fs not found on launch HOT 5
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 kitty-scrollback.nvim.