mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-20 23:44:59 +02:00
Rename kitty-tool to kitten
It's easier to type, and cuter. Also, most, if not all of the TUI parts of kitty's kittens will eventually be re-written into kitten. The only downside I can see is that we cant tab complete kitty anymore, but hopefully there will be less reason to run kitty from the shell as command line tools migrate to kitten. Meowrrrr!!!
This commit is contained in:
@@ -15,12 +15,12 @@ from . import BaseTest
|
||||
class TestBuild(BaseTest):
|
||||
|
||||
def test_exe(self) -> None:
|
||||
from kitty.constants import kitty_exe, kitty_tool_exe, str_version
|
||||
from kitty.constants import kitty_exe, kitten_exe, str_version
|
||||
exe = kitty_exe()
|
||||
self.assertTrue(os.access(exe, os.X_OK))
|
||||
self.assertTrue(os.path.isfile(exe))
|
||||
self.assertIn('kitty', os.path.basename(exe))
|
||||
exe = kitty_tool_exe()
|
||||
exe = kitten_exe()
|
||||
self.assertTrue(os.access(exe, os.X_OK))
|
||||
self.assertTrue(os.path.isfile(exe))
|
||||
self.assertIn(str_version, subprocess.check_output([exe, '--version']).decode())
|
||||
@@ -68,7 +68,7 @@ class TestBuild(BaseTest):
|
||||
q = stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH
|
||||
return mode & q == q
|
||||
|
||||
for x in ('kitty', 'kitty-tool', 'askpass.py'):
|
||||
for x in ('kitty', 'kitten', 'askpass.py'):
|
||||
x = os.path.join(shell_integration_dir, 'ssh', x)
|
||||
self.assertTrue(is_executable(x), f'{x} is not executable')
|
||||
if getattr(sys, 'frozen', False):
|
||||
|
||||
@@ -8,7 +8,7 @@ import shlex
|
||||
import subprocess
|
||||
import tempfile
|
||||
|
||||
from kitty.constants import kitty_tool_exe as kitty_tool
|
||||
from kitty.constants import kitten_exe as kitten
|
||||
|
||||
from . import BaseTest
|
||||
|
||||
@@ -86,10 +86,10 @@ def completion(self: TestCompletion, tdir: str):
|
||||
env['HOME'] = os.path.join(tdir, 'sub')
|
||||
env['KITTY_CONFIG_DIRECTORY'] = os.path.join(tdir, 'sub')
|
||||
cp = subprocess.run(
|
||||
[kitty_tool(), '__complete__', 'json'],
|
||||
[kitten(), '__complete__', 'json'],
|
||||
check=True, stdout=subprocess.PIPE, cwd=tdir, input=json.dumps(all_argv).encode(), env=env
|
||||
)
|
||||
self.assertEqual(cp.returncode, 0, f'kitty-tool __complete__ failed with exit code: {cp.returncode}')
|
||||
self.assertEqual(cp.returncode, 0, f'kitten __complete__ failed with exit code: {cp.returncode}')
|
||||
return json.loads(cp.stdout)
|
||||
|
||||
add('kitty ', has_words('@', '@ls', '+', '+open'))
|
||||
@@ -148,9 +148,9 @@ def completion(self: TestCompletion, tdir: str):
|
||||
add('kitty @launch --cwd ', has_words('current', 'oldest', 'last_reported'))
|
||||
add('kitty @launch --logo ', all_words('exe-not3.png'))
|
||||
add('kitty @launch --logo ~', all_words('~/exe-not3.png'))
|
||||
add('kitty-tool ', has_words('@'))
|
||||
add('kitty-tool ', does_not_have_words('__complete__'))
|
||||
add('kitty-tool @launch --ty', has_words('--type'))
|
||||
add('kitten ', has_words('@'))
|
||||
add('kitten ', does_not_have_words('__complete__'))
|
||||
add('kitten @launch --ty', has_words('--type'))
|
||||
|
||||
add('kitty + ', has_words('launch', 'kitten'))
|
||||
add('kitty + kitten ', has_words('icat', 'diff'))
|
||||
|
||||
@@ -143,7 +143,7 @@ copy --exclude */w.* d1
|
||||
self.ae(contents, {
|
||||
'g.1', 'g.2', f'{tname}/kitty.terminfo', 'simple-file', 'd1/d2/x', 'd1/y', 'a/sfa', 's1', 's2',
|
||||
'.local/share/kitty-ssh-kitten/kitty/version', '.local/share/kitty-ssh-kitten/kitty/bin/kitty',
|
||||
'.local/share/kitty-ssh-kitten/kitty/bin/kitty-tool'
|
||||
'.local/share/kitty-ssh-kitten/kitty/bin/kitten'
|
||||
})
|
||||
self.ae(len(glob.glob(f'{remote_home}/{tname}/*/xterm-kitty')), 2)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user