From 80c586afcde5d7db3f5fd69b62d103a378df5859 Mon Sep 17 00:00:00 2001 From: Kamiel de Visser Date: Mon, 22 Sep 2025 11:02:46 +0200 Subject: [PATCH 1/3] update real world examples --- README.md | 60 +++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 54 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 8cf741d..5bccef7 100644 --- a/README.md +++ b/README.md @@ -287,18 +287,66 @@ plz go ~/work/godot/ # cd's to ~/work/godot/ and lists the contents ``` #### Real-world example -Here is a real-world example of how I load my development environment for a Godot project. In my global .pls.yml I have setup the following alias: +Here are some real-world examples that show how I use `pls`. + +##### Easy git clones + +Using the alias below, I can easily clone any of my repositories by just running `pls clone `. ```yml - - alias: godot + - alias: clone command: | - wezterm start --always-new-process -- bash -c "cd ~/work/godot/projects/tit-versus-tat && nvim .; exec zsh" & - disown - Godot_v4.2.2-stable_linux.x86_64 -e --path ~/work/godot/projects/tit-versus-tat/ --single-window & + git clone git@github.com:codevogel/$1.git +``` + +No more remembering the full git SSH URL, or having to copy-paste it from the browser! +Expanding this further, I use the following alias to quickly clone repositories by other users than myself: + +```yml + - alias: clone-x + command: | + git clone git@github.com:$1/$2.git +``` +##### Launching my TMUX sessions + +After using `z` to jump to a project directory, I can quickly launch a default tmux session for that project by running `pls dev`: + +```yml + - alias: dev + command: | + ~/startup/default +``` + +This runs a tmux startup script defined in my [.dotfiles repository](https://github.com/codevogel/.dotfiles/blob/main/tmux/startup/default), which launches a tmux session with a few default windows, one running neovim, one running `lazygit`, and one running a shell. + +##### Running and disowning processes + +Sometimes I want to launch a GUI application from the terminal. But closing that very terminal would also close the application. We can use `disown` to prevent this from happening. But typing out the correct sequence of commands can become tedious. So, I created the following alias: + +```yml + - alias: se + command: | + $1 & disown exit ``` -Now, whenever I sit down to work on my game, I just run `plz godot` and my project loads up, along with launching a new terminal with `nvim` open in the project directory. + +Now, when I run `plz se `, it launched the executable, disowns it from the terminal, and closes the terminal. + +##### Switching keyboard layouts + +I usually type on a Sofle Choc, a split keyboard, which has CTRL and CAPS LOCK swapped in it's firmware. When I want to use my laptop keyboard, for example when I'm on the go, I need to swap these keys in software instead. I created the following alias to make this easy: + +```yml + - alias: keeb-split + command: | + sudo cat /etc/default/keyboard-split | sudo tee /etc/default/keyboard > /dev/null + sudo dpkg-reconfigure keyboard-configuration + - alias: keeb-laptop + command: | + sudo cat /etc/default/keyboard-laptop | sudo tee /etc/default/keyboard > /dev/null + sudo dpkg-reconfigure keyboard-configuration +``` ## File format From 93699626f74f71a747adc93b5746ecb7ed37458f Mon Sep 17 00:00:00 2001 From: Kamiel de Visser Date: Tue, 27 May 2025 13:50:15 +0200 Subject: [PATCH 2/3] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5bccef7..67a6b5b 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,9 @@ ![pls logo](https://raw.githubusercontent.com/codevogel/pls/refs/heads/main/assets/img/pls.png) -Project Level Shortcuts (pls) is a command-line tool designed to streamline your workflow by allowing you to create, manage, and execute custom aliases for frequently used commands. Say goodbye to messy bash profiles, and say hello to pls! 🐦 +Project Level Shortcuts (pls) is a command-line tool designed to streamline your workflow by allowing you to create, manage, and execute custom context-aware aliases for frequently used commands using portable `.pls.yml` files. Say goodbye to messy bash profiles, and say hello to pls! 🐦 -Run your most frequently used commands with ease, e.g. `pls test` to run tests, `pls godot` to open your Godot project and editor, `pls open-here` to open the current directory in your file manager, and whatever else you can think of! +Run your most frequently used commands with ease, e.g. `pls test` to run tests, `pls clone my-repo` to clone a repository under your name, `pls open-here` to open the current directory in your file manager, and whatever else you can think of! ### Demo From 0d06ebba0c980680b54a754800bd1b30d4c3f063 Mon Sep 17 00:00:00 2001 From: Kamiel de Visser Date: Wed, 11 Jun 2025 12:16:33 +0200 Subject: [PATCH 3/3] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 67a6b5b..34b06ce 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ![pls logo](https://raw.githubusercontent.com/codevogel/pls/refs/heads/main/assets/img/pls.png) -Project Level Shortcuts (pls) is a command-line tool designed to streamline your workflow by allowing you to create, manage, and execute custom context-aware aliases for frequently used commands using portable `.pls.yml` files. Say goodbye to messy bash profiles, and say hello to pls! 🐦 +Project Level Shortcuts (pls) is a command-line tool designed to streamline your workflow by allowing you to create, manage, and execute custom context-aware aliases for frequently used commands using portable `.pls.yml` files. Say goodbye to messy shell profiles, and say hello to pls! 🐦 Run your most frequently used commands with ease, e.g. `pls test` to run tests, `pls clone my-repo` to clone a repository under your name, `pls open-here` to open the current directory in your file manager, and whatever else you can think of!