pal

command module
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 6, 2024 License: MIT Imports: 2 Imported by: 0

README

Pal

Pal is a command line tool to generate an alias to cd into each of your projects. An alias can also be generated to open the directory with your editor's CLI command, e.g. nvim, code, subl.

Installation

Homebrew
brew install jaytyrrell13/tap/pal
Manual Installation

Download the latest release archive from the releases page.

Usage

To get started, you may execute Pal's install command. This will ask for the path to your projects, your editor command usage e.g. Skip, Same, Unique, your editor's CLI tool e.g. nvim, code, subl, if you chose "Same" for your editor command usage and your shell e.g. Bash, Zsh, Fish. These settings will be saved in ~/.config/pal/config.json.

pal install [--path | -p] [--editorCmd | -e] [--editorMode | -m]

The make command will go through each directory of your projects and ask for the alias you want to use. If you chose "Unique" previously, you will be prompted for the editor's CLI tool after each alias. This will generate a ~/.config/pal/aliases file and update your shell to automatically source the aliases file if it exists. If you use bash or zsh, it will append [ -f "$HOME/.config/pal/aliases" ] && source "$HOME/.config/pal/aliases" to your ~/.bashrc or ~/.zshrc. If you use fish, it will create ~/.config/fish/conf.d/pal.fish to test if the aliases file exists and if so then source it.

Note: the make command will prompt you to run the install command first if the config does not exist yet.

pal make

The add command can be used if you want an alias for a directory outside your projects e.g. a directory of notes. If you chose "Unique" previously, you will be prompted for the editor's CLI tool.

Note: the add command will prompt you to run the make command if the aliases file does not exist yet.

pal add [--path | -p] [--name | -n] [--editorCmd | -e]

The list command will print out all the aliases currently in ~/.config/pal/aliases.

pal list

The clean command will delete your ~/.config/pal/aliases file in your home directory.

pal clean

The refresh command will delete your ~/.config/pal/aliases file and then run the make command.

pal refresh

The config command allows listing or setting config values.

When using the config set command, the first argument should be a key from the config file (Path, Editormode, Editorcmd, Shell, Extras) and the second argument should be its new value. Setting the "Extras" key will append to the list instead of replacing it.

pal config list
pal config set Path /new/path

Support

If you'd like to support the development of pal, you can buy me a coffee.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cmd
add
pkg
ui

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL