-
Hello. I was scrolling through htop and noticed that kitty starts In my config I haven't changed the shell option, it looks like the default In /etc/passwd I have Alacritty and xterm with default settings open normal I'm not sure what's going on. Any suggestions are appreciated, thank You. Kitty 0.24.4, Arch linux, bspwm. |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 3 replies
-
kitty provides shell integration without modifying rc files by running bash POSIX mode. https://sw.kovidgoyal.net/kitty/shell-integration/#how-it-works |
Beta Was this translation helpful? Give feedback.
-
The documentation at https://sw.kovidgoyal.net/kitty/shell-integration/#how-it-works says
That is not what I observe. In my
The same error doesn't occur if I open my normal Mac OS terminal. I can also reproduce the issue simply by starting kitty and typing
Actual output:
Expected output: something like
When I explicity start a new bash instance (without the I am running kitty 0.25.2 on Mac OS Monterey 12.4. |
Beta Was this translation helpful? Give feedback.
-
On Mon, Jun 20, 2022 at 07:40:30AM -0700, Marius Kleiner wrote:
That is not what I observe. In my `.profile`, I am sourcing some scripts to enable bash auto completion. Some of these use bash's `<( )` syntax. When starting kitty, I get the following error:
```
-bash: /Library/GoogleCorpSupport/srcfs/shell_completion/p4: line 25: syntax error near unexpected token `<'
-bash: /Library/GoogleCorpSupport/srcfs/shell_completion/p4: line 25: ` <( ... `
```
The same error doesn't occur if I open my normal Mac OS terminal.
I can also reproduce the issue simply by starting kitty and typing
```
echo <(ls)
```
Actual output:
```
-bash: syntax error near unexpected token `('
```
Expected output: something like
```
/dev/fd/63
```
When I explicity start a new bash instance (without the `--posix` flag), the command succeeds.
I am running kitty 0.25.2 on Mac OS Monterey 12.4.
Does not reproduce for me.
kitty --config=NONE -o shell=bash
echo <(ls)
/dev/fd/63
I am guessing you have multiple bashes on your system and a different
one is being executed from the one you expect.
|
Beta Was this translation helpful? Give feedback.
-
On Mon, Jun 20, 2022 at 08:45:59AM -0700, Marius Kleiner wrote:
Thanks Kovid for replying so quickly (I got to love Kitty within just a single weekend 😍).
> kitty --config=NONE -o shell=bash
Do I have to configure in some way how to start Kitty? All I did was download the DMG from the Github releases page and run it from the Applications folder, nothing more.
That is just a way of launching kitty with no config and shell set to
bash to aid reproduction.
> I am guessing you have multiple bashes on your system and a different
one is being executed from the one you expect.
I tried to validate this hypothesis. First by getting the PID of the running bash instance:
```
~$ ps
PID TTY TIME CMD
1558 ttys001 0:00.03 -bash --posix
```
/bin/bash on macOS is limited to version 3.2 and does not support
a whole bunch of things. If you are really using that, then I suggest
you turn off shell_integration in kitty.conf and you will be fine.
|
Beta Was this translation helpful? Give feedback.
-
Just for your reference, this is causing an issue say here: starship/starship#5382 |
Beta Was this translation helpful? Give feedback.
-
No, it isn't. Startup files are sourced with POSIX mode disabled, as
documented.
|
Beta Was this translation helpful? Give feedback.
kitty provides shell integration without modifying rc files by running bash POSIX mode.
POSIX mode will be disabled after running, so there is nothing to worry about.
https://sw.kovidgoyal.net/kitty/shell-integration/#how-it-works