chore(nushell): remove risky and redundant aliases
This commit is contained in:
@@ -1,29 +1,71 @@
|
||||
# TerminalPolyjuice
|
||||
|
||||
[](https://github.com/trekhleb/state-of-the-art-shitcode)
|
||||
A "Polyjuice Potion" for your terminals: a single repository that unifies configuration across Zsh, Bash, Nushell, and PowerShell — aliases, functions, prompts — together with settings for common terminal tools such as Starship, Helix, and Zed. Each shell is configured independently; pick what you need.
|
||||
|
||||
Automatically configure terminals according to my habits.
|
||||
## Repository Layout
|
||||
|
||||
## For `ZSH`
|
||||
Using `Oh-My-ZSH` framework to manage plugins, and `Starship` to customize prompt.
|
||||
|
||||
Changes:
|
||||
`Oh-My-ZSH` is installed at `$HOME/.oh-my-zsh`;
|
||||
`$HOME/.zshrc` is linked to `zsh/zshrc`;
|
||||
`$HOME/.config/starship.toml` is linked to `starship/starship.toml`;
|
||||
|
||||
Required software:
|
||||
`git`; `fzf`; `zoxide`; `python`; `starship`
|
||||
|
||||
```shell
|
||||
git clone https://gitea.meip.work/gwbeip/TerminalPolyjuice.git $HOME/.TerminalPolyjuice
|
||||
cd $HOME/.TerminalPolyjuice/zsh
|
||||
zsh polyjuice.sh install_ohmyzsh config_starship check
|
||||
```
|
||||
.
|
||||
├── zsh/ # Zsh: aliases, functions, plugin loading, prompt (Starship)
|
||||
├── bash/ # Bash: aliases, functions, integrations, key bindings
|
||||
├── nushell/ # Nushell: custom modules and prompt
|
||||
├── pwsh/ # PowerShell: setup guide and Oh-My-Posh themes
|
||||
├── starship/ # Starship prompt presets (default / powerline)
|
||||
├── helix/ # Helix editor configuration
|
||||
├── zed/ # Zed editor keymap
|
||||
└── wsl/ # WSL-related notes
|
||||
```
|
||||
|
||||
`zsh/zshenv` contains some useful `$PATH`
|
||||
## Prerequisites
|
||||
|
||||
`zsh/p10k.zsh` includes the configuration for execution time when using `powerlevel10k`
|
||||
Install the tools relevant to the shell(s) you intend to use: `git`, `fzf`, `zoxide`, `starship`, `python` (some features also rely on `jq`, `uv`, etc.). Start by cloning the repository to a fixed location:
|
||||
|
||||
## For `powershell`
|
||||
```shell
|
||||
git clone <repo-url> "$HOME/.TerminalPolyjuice"
|
||||
```
|
||||
|
||||
## Usage per Shell
|
||||
|
||||
### Zsh
|
||||
|
||||
Run the install script to download plugins, configure Starship, and check dependencies. It symlinks `$HOME/.zshrc` to the in-repo `zsh/zshrc` and points `$HOME/.config/starship.toml` at a Starship preset.
|
||||
|
||||
```shell
|
||||
cd "$HOME/.TerminalPolyjuice/zsh"
|
||||
zsh polyjuice.sh install config_starship check
|
||||
```
|
||||
|
||||
Run `exec zsh` to apply. To install Zsh plugins separately, call `pj_install_plugins` from within Zsh.
|
||||
|
||||
### Bash
|
||||
|
||||
`bash/bashrc` is the self-contained entry point that auto-loads everything under `settings/`, `aliases/`, `functions/`, `integrations/`, and `keybindings/`. Source it from your `~/.bashrc`:
|
||||
|
||||
```shell
|
||||
echo 'source "$HOME/.TerminalPolyjuice/bash/bashrc"' >> ~/.bashrc
|
||||
```
|
||||
|
||||
`bash_profile` already sources `bashrc` in the same directory, so you may alternatively symlink it to `$HOME/.bash_profile`.
|
||||
|
||||
### Nushell
|
||||
|
||||
The entry point is `nushell/nu_polyjuice.nu`, which loads all custom modules under `modules/` and sets up the prompt. Source it from your Nushell startup file (`env.nu` or `config.nu`):
|
||||
|
||||
```nu
|
||||
source ($env.HOME | path join ".TerminalPolyjuice" "nushell" "nu_polyjuice.nu")
|
||||
```
|
||||
|
||||
> The prompt uses the built-in `pj_prompt` module by default. To switch to Starship instead, run `pj starship config <name>` (where `<name>` matches a preset under `starship/`, e.g. `default` or `powerline`); use `pj starship list` to see available presets.
|
||||
|
||||
### PowerShell (Windows)
|
||||
|
||||
Follow the steps in [`pwsh/HowToUse.md`](pwsh/HowToUse.md): install `PSReadLine` and `PSFzf`, initialize Starship and Zoxide, then copy `pwsh/*.omp.json` into `$env:POSH_THEMES_PATH` and enable Oh-My-Posh in your `$PROFILE`.
|
||||
|
||||
### Helix / Zed
|
||||
|
||||
- **Helix**: symlink or copy `helix/config.toml` into your Helix config directory.
|
||||
- **Zed**: symlink or copy `zed/keymap.json` into your Zed config directory.
|
||||
|
||||
## License
|
||||
|
||||
This project is released under the [GNU Affero General Public License v3.0 or later](LICENSE) (AGPL-3.0-or-later).
|
||||
|
||||
Reference in New Issue
Block a user