Skip to main content

Server to aid shell navigation

Project description

ShellServer

It's a mix of Starship and Zoxide but faster.

On Starship, every 'Enter' keystroke spawns a new process, which may cause a lag between prompts.
Zoxide will raise a new process every time you call it.
ShellServer raises the server only in the first shell creation and will communicate with your shell on every 'Enter' keystroke.

But if your hardware gives you a fluid shell experience using Starship, I recommend that you keep with it because it's way more customizable.

Features

Prompt with a fast glance at what is in directory

Bloated
This is the most bloated prompt that you will get. It will indicate the existence of Python, C, C++, Lua, Node and PowerShell files on directory.
The compilers searched are GCC and G++.

No lag from spawning processes

Fast

Better 'cd'

p, pz

  • Tab completions works just fine.
  • With no arguments will behave just like 'cd'. Note: fzf is a dependency to use 'pz'

Switching Theme

Switch-Theme Can take four arguments: all, system, terminal, and blue.

  • terminal: Toggles Windows Terminal default theme between 'Tango Dark' and 'Solarized Light'.
  • system: Toggles system wide Dark Mode.
  • blue: Toggles 'Blue light reduction'.
  • all: Same as not passing arguments. Do all the above.

Searching history

history

Listing directory

lss

CLI

The server knows how many clients it haves and will know if you quit shell with 'exit'
but if window is closed on 'X' it may outlive the shell.

usage: shellserver [-h] {kill,clear}

positional arguments:
  {kill,clear}  "kill" to kill the server, "clear" to clear the cache.

options:
  -h, --help    show this help message and exit

Requirements

  • Python 3.10+
  • PowerShell 6.2+ (I think)
  • Any NerdFont (I use MesloGS NF)
  • A xterm compatible terminal

Installation

Currently, ShellServer will work only in PowerShell on Windows. A few things must change to make it work on Linux, so make an Issue if you want to use it.

> pip install shellserver  # or pip install --user shellserver
> Install-Module ShellServer -Scope CurrentUser

In your PowerShell profile:

# By the beginning of the file
pythonw -m shellserver  # note the 'w'

# By the end of the file
Import-Module ShellServer

Keep updated

As many things might change in versions below 0.1.0, pip install --upgrade shellserver and Upgrade-Module ShellServer must be run both when one changes.
The last v0.0.7 will work with the PowerShell ShellServer module 0.0.6.

Known Issues

  • Now we can parse git packfiles, but still can't resolve deltas. So it will fall back to use git when it's needed (faster but still experimental). Do pythonw -m shellserver --use-git in your profile to always use git.

Debugging

Any errors that occur will be saved in $env:localappdata\shellserver\traceback.

Attach a stdout to the server and it will become pretty verbose when it sees a git repo.

shellserver kill
# A message that the server is not responding and your prompt will be like before.
python -m shellserver  # no w, blocking

Open another shell and walk to a git repo.

The server can accept --let-crash argument to let errors propagate. --use-git will have preference over this.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

shellserver-0.0.7.tar.gz (19.5 kB view details)

Uploaded Source

Built Distribution

shellserver-0.0.7-py3-none-any.whl (21.5 kB view details)

Uploaded Python 3

File details

Details for the file shellserver-0.0.7.tar.gz.

File metadata

  • Download URL: shellserver-0.0.7.tar.gz
  • Upload date:
  • Size: 19.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for shellserver-0.0.7.tar.gz
Algorithm Hash digest
SHA256 30a00c565b88d2bb4ff5cbabafe09a954f10608c3e3e3d74045401cd7f0b9500
MD5 a91faa15d9266421e188f00edf66419d
BLAKE2b-256 77b176a9ba821b74bf2a6b314f3c63b53245687fe893c6f55161de484704c25f

See more details on using hashes here.

File details

Details for the file shellserver-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: shellserver-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 21.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for shellserver-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 e29a1f4837bef84dcd902f373a803a6b7a7751dae3c009567950564a3fbdcd3c
MD5 3cdc4c0548613bc1b8617f8492fc6021
BLAKE2b-256 570e8a73d684d12a6530be6bb7ab05e18c58abb70e33499346cffc75eedf3592

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page