Commit graph

80 commits

Author SHA1 Message Date
Oliver Davies 2d1a5d682a zsh: Include aliases in the current directory 2020-11-23 14:24:07 +00:00
Oliver Davies af1d0b4483 zsh: Re-implement pbcopy and pbpaste 2020-11-11 11:37:38 +00:00
Oliver Davies adac636d47 git: Use __git_ps1 in Git prompt
Use the `__git_ps1` function within the Git prompt to give additional
information when operations like a rebase is happening.
2020-11-10 15:43:17 +00:00
Oliver Davies 7538e88f7c zsh: Include snap binaries in PATH 2020-09-10 14:44:40 +01:00
Oliver Davies 720f41b8b2 zsh: Change m from an alias to a function
Change `m` from an alias to a function to allow for passing additional
parameters.
2020-09-10 14:44:38 +01:00
Oliver Davies 1f4852e8c6 zsh: Auto-complete m as make 2020-09-03 08:08:55 +01:00
Oliver Davies 1117fbd76d zsh: Update m alias
Update the `m` alias to use a Makefile within the notes directory if
there is one, otherwise default to one in the current directory.
2020-09-03 08:08:53 +01:00
Oliver Davies fbb17f1f00 git: Tweak prompt colours 2020-07-30 16:21:32 +01:00
Oliver Davies 2f624af066 zsh: Run Composer with Docker 2020-07-30 01:46:00 +01:00
Oliver Davies b71aec495a zsh: Add Git commit SHA to prompt 2020-07-30 01:46:00 +01:00
Oliver Davies c78a8465a6 Remove the shorten function 2020-07-23 16:24:23 +01:00
Oliver Davies a85ff2e8bb Run phpunit or pest depending on the project
Remove the `p` and `pf` aliases that previously only worked for PHPUnit,
and re-add them as functions that run either PHPUnit or Pest PHP based
on the project dependencies.

The checking is done within the `phpunit-or-pest` script and then used
within the new `p` and `pf` functions.
2020-07-23 16:24:23 +01:00
Oliver Davies ce9a65340e Add m alias for make 2020-07-22 10:49:08 +01:00
Oliver Davies b35d9a938a git: Add an init template, use it to create the main branch
See
56d614f806.

> This change adds a HEAD file to the Git template with a different ref.
This means that new repositories will commit to a "main" branch by
default instead.
2020-07-20 01:47:34 +01:00
Oliver Davies 0f797c6ffe Prefer "main" to "master"
See
1e7fa50da0.

> This commit introduces `git-master-to-main-wrapper`, which seamlessly
prefers `main` to `master` but works fine with repos that do use
a `master` branch.
2020-07-19 22:06:30 +01:00
Oliver Davies 2e8c717036 Enable nvm 2020-07-14 15:08:57 +01:00
Oliver Davies d7e43100bc zsh: Fix "no matches found: HEAD^" error
Add `options.zsh` and use `setopt NO_NOMATCH` to pass the bad match onto
the command as per
https://github.com/ohmyzsh/ohmyzsh/issues/449#issuecomment-6973326.

Fixes #14
2020-06-21 00:30:14 +01:00
Oliver Davies e0c9014ec0 zsh: Enable extendedglob
Enable the extendedglob option, which is needed for the scripts in the
`configs/post` directory to load correctly.

This includes the completion script that is needed to fix #12 and #13.
2020-06-21 00:13:38 +01:00
Oliver Davies d51de5bb17 Revert "zsh: Use $_ANTIGEN_INSTALL_DIR for macOS"
This reverts commit 29171bba91.
2020-06-10 11:42:19 +01:00
Oliver Davies cb22f5ae67 Un-dot the bin directory 2020-06-10 02:20:19 +01:00
Oliver Davies 62e2db48ec zsh: Add comment for $TERM_PROGRAM 2020-06-09 22:35:43 +01:00
Oliver Davies 29171bba91 zsh: Use $_ANTIGEN_INSTALL_DIR for macOS 2020-06-09 22:23:19 +01:00
Oliver Davies 2f74e7443a zsh: Override antigen.zsh Linux path again 2020-06-09 22:20:32 +01:00
Oliver Davies 10ac710d7c zsh: Switch path to antigen.zsh based on OS
Switch the path to the antigen.zsh file (for loading ZSH plugins) based
on the OS (i.e. macOS and Linux) using the functions added in
91d7ca5005.

This should quicker than using the `find` command and locating the file
within the `/usr` directory.

References #9
2020-06-09 21:41:59 +01:00
Oliver Davies 211ea05c0e Don't connect to tmux in PhpStorm terminal 2020-06-09 21:29:04 +01:00
Oliver Davies 91d7ca5005 Add functions for checking OS 2020-06-09 21:29:04 +01:00
Oliver Davies 14317a1230 Add Symfony and PHPUnit aliases 2020-06-09 19:09:25 +01:00
Oliver Davies d258d9db8b zsh: Move call to ensure_tmux_is_running 2020-05-27 19:17:24 +01:00
Oliver Davies d27af16512 Fix separators in path 2020-05-21 14:14:22 +01:00
Oliver Davies 3ea811046d zsh: Rename navigation to path, move PATH 2020-05-13 01:08:05 +01:00
Oliver Davies bdcc85c50e
zsh: Alias c to clear 2020-05-11 20:20:50 +01:00
Oliver Davies 3674617172 Updated path to antigen
Had to install antigen manually as per
https://github.com/zsh-users/antigen/issues/659, and have updated the
path to antigen.zsh to match.
2020-05-06 17:33:20 +01:00
Oliver Davies 2caaa1ed57 Include .local/bin in PATH 2020-05-06 17:28:59 +01:00
Oliver Davies a68b9fd0f3 Increase history size 2020-04-23 15:32:41 +01:00
Oliver Davies f46937d2de Fix case-insensitive autocompletion 2020-03-03 12:26:07 +00:00
Oliver Davies de5746401c Add completion script for g function 2020-03-03 00:51:30 +00:00
Oliver Davies efa6bcf778 Remove duplicate completion.zsh file 2020-03-03 00:44:30 +00:00
Oliver Davies 0865136067 Rename functions/g to configs/git.zsh 2020-03-02 23:40:17 +00:00
Oliver Davies e4fa6d1a5b Fix autocompletion for g function
Fixes #4
2020-02-25 21:53:36 +00:00
Oliver Davies 640e0f2a51 Allow for grouping pre and post configs 2020-02-25 21:52:57 +00:00
Oliver Davies 95a5bebec4 Create history.zsh 2020-02-06 09:20:34 +00:00
Oliver Davies ec68828f3d Add v as an alias for vagrant 2020-01-28 23:52:12 +00:00
Oliver Davies 29bad6ff65 Add mkdir alias 2020-01-27 22:23:55 +00:00
Oliver Davies 43d2091670 Ensure correct exit code if there are no local aliases 2020-01-27 22:23:09 +00:00
Oliver Davies db6c9b4d7f Stop spaces being eaten on autocomplete
See https://superuser.com/a/613817
2020-01-24 00:19:42 +00:00
Oliver Davies aa11d28b61 Ensure that the directory is within a git repository
If not, return early in `git_prompt` info.

Fixes #3
2020-01-23 23:25:22 +00:00
Oliver Davies d942a47ef5 Display whether the repo is dirty in the prompt 2020-01-21 13:48:28 +00:00
Oliver Davies f1c0baf0f7 Start customising prompt 2020-01-21 12:20:20 +00:00
Oliver Davies 9adb9cfb90 Add a blank line before each command 2020-01-21 12:16:52 +00:00
Oliver Davies 4dd0d767aa Enable colours in prompt and output 2020-01-21 11:54:38 +00:00