-
-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch to zgenom #88
Merged
Merged
Switch to zgenom #88
Changes from 3 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
de71ff2
Update to use zgenom instead of zgen
unixorn a188239
Update readme to reflect switch to zgenom
unixorn d687fba
TOC update after switch to zgenom
unixorn 34c172f
Add faq for garbled prompt separators
unixorn 1ea505d
Add superlinter github action
unixorn 879456a
Add markdown link check github action
unixorn 6901e04
Fix lint bugs in .codeclimate.yml
unixorn 9ef5c7d
Disable overzealous shellcheck warnings
unixorn 9e222a6
Clean up markdown formatting
unixorn d4af44b
Update toc
unixorn 5ba2c5e
Update github checks
unixorn d4966a5
Remove unneeded circleci config any more
unixorn f33dea5
Added GH actions in another branch, make the merge less painful
unixorn 4232b39
Merge remote-tracking branch 'origin/master' into switch-to-zgenom
unixorn e3f8677
Merge remote-tracking branch 'origin/master' into switch-to-zgenom
unixorn 14dd8fe
Merge remote-tracking branch 'origin/master' into switch-to-zgenom
unixorn 2989c91
Merge remote-tracking branch 'origin/master' into switch-to-zgenom
unixorn 7d7cc9c
Merge remote-tracking branch 'origin/master' into switch-to-zgenom
unixorn e834b20
Fix bug in ssh-agent handling
unixorn 9623a7d
Clean up readme
unixorn a44e049
Update copyrights
unixorn 96f2495
Add warning about zgenom switch
unixorn 587081c
Update toc in readme
unixorn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,15 +21,17 @@ | |
- [Contents of the kit](#contents-of-the-kit) | ||
- [Included plugins:](#included-plugins) | ||
- [Customizing the kit](#customizing-the-kit) | ||
- [Behavior toggles](#behavior-toggles) | ||
- [Functions and Aliases](#functions-and-aliases) | ||
- [I like a plugin, but the aliases it installs overwrite other commands or aliases](#i-like-a-plugin-but-the-aliases-it-installs-overwrite-other-commands-or-aliases) | ||
- [ZSH options.](#zsh-options) | ||
- [Self-update Settings](#self-update-settings) | ||
- [Changing the zgen plugin list](#changing-the-zgen-plugin-list) | ||
- [Changing the plugin list](#changing-the-plugin-list) | ||
- [Disabling zmv](#disabling-zmv) | ||
- [Disabling oh-my-zsh](#disabling-oh-my-zsh) | ||
- [FAQ](#faq) | ||
- [Stow complains with a warning that stowing zsh would cause conflicts](#stow-complains-with-a-warning-that-stowing-zsh-would-cause-conflicts) | ||
- [I added a new completion plugin and it isn't working](#i-added-a-new-completion-plugin-and-it-isnt-working) | ||
- [Other Resources](#other-resources) | ||
- [ZSH](#zsh) | ||
- [Dotfiles in general](#dotfiles-in-general) | ||
|
@@ -95,17 +97,17 @@ If you get garbled branch glyphs, make sure there isn't a separate font setting | |
|
||
## Set up Zgen and the starter kit | ||
|
||
Now that your fonts and default shell have been set up, install [zgen](https://github.com/tarjoilija/zgen) and the dotfiles from this starter kit repository. | ||
Now that your fonts and default shell have been set up, install [zgenom](https://github.com/jandamm/zgenom.git) and the dotfiles from this starter kit repository. | ||
|
||
1. Install [Zgen](https://github.com/tarjoilija/zgen) | ||
1. Install [Zgenom](https://github.com/jandamm/zgenom.git) | ||
1. `cd ~` | ||
2. `git clone git@github.com:tarjoilija/zgen.git` | ||
2. `git clone https://github.com/jandamm/zgenom.git` | ||
unixorn marked this conversation as resolved.
Show resolved
Hide resolved
|
||
2. Install the starter kit | ||
1. `cd ~` | ||
2. `git clone [email protected]:unixorn/zsh-quickstart-kit.git` | ||
3. Configure zsh by symlinking the `.zshrc`, `.zsh_aliases` and `.zsh-completions` from this repo into your `~`. | ||
1. You can do this with `stow` by: | ||
1. `cd zsh-quickstart-kit` | ||
1. `cd /path/to/your/clone/of/the/zsh-quickstart-kit` | ||
unixorn marked this conversation as resolved.
Show resolved
Hide resolved
|
||
2. `stow --target=/Users/YourUsername zsh`. Replace `/Users/YourUsername` with `/home/YourUsername` if you're on Linux. | ||
|
||
The `.zshrc`, `.zsh_aliases` & `.zsh_functions` files included in this kit enable the plugins listed below. | ||
|
@@ -114,14 +116,14 @@ The `.zshrc`, `.zsh_aliases` & `.zsh_functions` files included in this kit enabl | |
|
||
The zsh-quickstart-kit configures your ZSH environment so that it includes: | ||
|
||
* Automatic periodic updates of both zgen and your plugins | ||
* Automatic periodic updates of both zgenom and your plugins | ||
* Cross-session shared history so commands typed in one terminal window can be seen and searched in all your other `zsh` sessions on the same machine. | ||
* Automatic deduplication of your command history. | ||
* Many more tab completions, courtesy of the [zsh-users/zsh-completions](https://github.com/zsh-users/zsh-completions) repository, and periodic updating to tip of master of that repository so you get updates to the extra tab completions. | ||
* Supercharged command history search with [fzf](https://github.com/junegunn/fzf). | ||
* Syntax highlighting at the command line. | ||
* Tab completion of Rakefile targets. | ||
* Enabling [oh-my-zsh](https://github.com/robbyrussell/oh-my-zsh)-compatible plugins and themes (via the [zgen](https://github.com/tarjoilija/zgen) framework). | ||
* Enabling [oh-my-zsh](https://github.com/robbyrussell/oh-my-zsh)-compatible plugins and themes (via the [zgenom](https://github.com/jandamm/zgenom.git) framework). | ||
* Various helper functions for interacting with macOS's clipboard, audio volume, Spotlight and Quicklook. For your convenience, these will only load if you are on a macOS machine so you can use the same plugin list on any *NIX system. | ||
* If you've installed iTerm2's shell integration, it will automatically be loaded during shell startup. | ||
|
||
|
@@ -148,7 +150,7 @@ The zsh-quickstart-kit configures your ZSH environment so that it includes: | |
* [zsh-users/zsh-history-substring-search](https://github.com/zsh-users/zsh-history-substring-search) - Better history search. | ||
* [zsh-users/zsh-syntax-highlighting](https://github.com/zsh-users/zsh-syntax-highlighting) - Syntax highlighting as you type. | ||
|
||
The quickstart kit also uses `zgen` to load oh-my-zsh and these plugins: | ||
The quickstart kit also uses `zgenom` to load oh-my-zsh and these plugins: | ||
* aws | ||
* brew - only loaded on macOS | ||
* chruby | ||
|
@@ -190,11 +192,11 @@ The quickstart kit does an opinionated (i.e. my way) setup of ZSH options and ad | |
|
||
The quickstart kit will automatically check for updates every seven days. If you want to change the interval, set `QUICKSTART_KIT_REFRESH_IN_DAYS` in a file in `~/.zshrc.d`. If you want to disable self updating entirely, add `unset QUICKSTART_KIT_REFRESH_IN_DAYS` in a file in `~/.zshrc.d`. | ||
|
||
## Changing the zgen plugin list | ||
## Changing the plugin list | ||
|
||
I've included what I think is a good starter set of zsh plugins in this repository. However, everyone has their own preferences for their environment. | ||
I've included what I think is a good starter set of ZSH plugins in this repository. However, everyone has their own preferences for their environment. | ||
|
||
To make the list easier to customize without having to maintain a separate fork of this kit, if you create a file named `~/.zgen-local-plugins`, the `.zshrc` from this starter kit will source that **instead** of running the `load-starter-plugin-list` function defined in `~/.zgen-setup`. | ||
To make the list easier to customize without having to maintain a separate fork of the quickstart kit, if you create a file named `~/.zgen-local-plugins`, the `.zshrc` from this starter kit will source that **instead** of running the `load-starter-plugin-list` function defined in `~/.zgen-setup`. | ||
|
||
**Using `~/.zgen-local-plugins` is not additive, it will _completely replace_ the kit-provided list of plugins.** | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,43 @@ | ||
#!/bin/zsh | ||
#!/usr/bin/env zsh | ||
# | ||
# Only including a shebang to trigger Sublime Text to use shell | ||
# Only including a shebang to trigger editors to use shell | ||
# syntax highlighting. | ||
# | ||
# Copyright 2006-2019 Joseph Block <[email protected]> | ||
# Copyright 2006-2020 Joseph Block <[email protected]> | ||
# | ||
# BSD licensed, see LICENSE.txt | ||
|
||
# Clone zgen if you haven't already | ||
if [[ -z "$ZGEN_PARENT_DIR" ]]; then | ||
ZGEN_PARENT_DIR=$HOME | ||
# Clone zgenom if you haven't already | ||
if [[ -z "$ZGENOM_PARENT_DIR" ]]; then | ||
ZGENOM_PARENT_DIR=$HOME | ||
fi | ||
if [[ ! -f $ZGEN_PARENT_DIR/zgen/zgen.zsh ]]; then | ||
if [[ ! -d "$ZGEN_PARENT_DIR" ]]; then | ||
mkdir -p "$ZGEN_PARENT_DIR" | ||
|
||
# zgenom stores the clones plugins & themes in $ZGEN_DIR when it | ||
# is set. Otherwise it stuffs everything in the source tree, which | ||
# is unclean. | ||
ZGEN_DIR=${ZGEN_DIR:-$HOME/.zgenom} | ||
|
||
# echo "ZGEN_DIR: $ZGEN_DIR" | ||
|
||
if [[ ! -f $ZGENOM_PARENT_DIR/zgenom/zgenom.zsh ]]; then | ||
if [[ ! -d "$ZGENOM_PARENT_DIR" ]]; then | ||
mkdir -p "$ZGENOM_PARENT_DIR" | ||
fi | ||
pushd $ZGEN_PARENT_DIR | ||
git clone git@github.com:tarjoilija/zgen.git | ||
pushd $ZGENOM_PARENT_DIR | ||
git clone https://github.com/jandamm/zgenom.git | ||
popd | ||
fi | ||
source $ZGEN_PARENT_DIR/zgen/zgen.zsh | ||
unset ZGEN_PARENT_DIR | ||
|
||
# echo "zgenom path - $ZGENOM_PARENT_DIR/zgenom/zgenom.zsh" | ||
|
||
if [[ ! -f "$ZGENOM_PARENT_DIR/zgenom/zgenom.zsh" ]]; then | ||
echo "Can't find zgenom.zsh" | ||
else | ||
# echo "Loading zgenom" | ||
source "$ZGENOM_PARENT_DIR/zgenom/zgenom.zsh" | ||
fi | ||
|
||
unset ZGENOM_PARENT_DIR | ||
|
||
warn-about-prompt-change() { | ||
if [[ ! -f ~/.zsh-quickstart-kit-prompt-switch-warning ]]; then | ||
|
@@ -235,6 +252,8 @@ if [[ -L ~/.zgen-local-plugins ]]; then | |
REAL_ZGEN_SETUP="${HOME}/$(readlink ~/.zgen-local-plugins)" | ||
fi | ||
|
||
# echo "REAL_ZGEN_ZETUP: $REAL_ZGEN_SETUP" | ||
|
||
# If .zgen-setup is newer than init.zsh, regenerate init.zsh | ||
if [ $(get_file_modification_time ${REAL_ZGEN_SETUP}) -gt $(get_file_modification_time ~/.zgen/init.zsh) ]; then | ||
echo "$(basename ${REAL_ZGEN_SETUP}) updated; creating a new init.zsh from plugin list in ${REAL_ZGEN_SETUP}" | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent indentation for list items at the same level