GithubHelp home page GithubHelp logo

unixorn / zsh-quickstart-kit Goto Github PK

View Code? Open in Web Editor NEW
760.0 15.0 93.0 530 KB

A simple ZSH quickstart for using ZSH, zgenom, oh-my-zsh and a curated list of extra plugins. It is designed to be easy to customize without requiring you to maintain your own fork.

License: BSD 3-Clause "New" or "Revised" License

Shell 100.00%
zsh-quickstart-kit zsh-options zsh-plugins zsh-completions zsh-theme dotfiles zsh zshrc zshrc-enhancements zgenom

zsh-quickstart-kit's Introduction

I'm an SRE and live in Denver. Don't contact me about cryptocoin "opportunities" - At best, kleptcurrencies are an Ponzi scam, and they're also usually an ecological disaster too. I want nothing to do with the entire ecosystem.

  • šŸ’¬ My blog is at unixorn.github.io.
  • šŸ˜ My Mastodon is @[email protected]
  • šŸ”­ When I'm not maintaining my various lists and projects, Iā€™m usually tinkering on some IOT (More specifically, Home Assistant projects or playing around with some ARM single board computers, ESP32s or ESP8266s.
  • āš” I enjoy cooking, especially baking.
  • āš” I enjoy hiking and have summited a couple fourteeners (Quandary and Mt. Bierstadt).

If you like the lists I'm maintaining or the other projects I blog about, you can sponsor me, or buy geeky swag from my spreadshirt and redbubble shops.


Full history

zsh-quickstart-kit's People

Contributors

armarquez avatar briangilbert avatar chiqomar avatar dependabot[bot] avatar dglynn avatar docwhat avatar dotcomstar avatar dotcoyote avatar genevera avatar harshcurious avatar jaredweiss avatar jasehadd avatar jfmcdowell avatar lenart12 avatar mariozig avatar matthiasr avatar mdhooge avatar mingaldrichgan avatar neiromaster avatar qoreqyas avatar reduxionist avatar tam1m avatar twnaing avatar unixorn avatar zswanson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zsh-quickstart-kit's Issues

Always recompiling

When using .zgen-local-plugins files I always get this message when I start a new shell (without touching the file). I tried with the default example and got the same issue.

.zgen-local-plugins updated; creating a new init.zsh from plugin list in /home/rif/.zgen-local-plugins
-- zgenom: Creating `/home/rif/.zgenom/init.zsh` ...
-- zgenom: Compiling files ...

I am using zsh 5.8 (x86_64-pc-linux-gnu) on arch linux

fzf: [Command failed: find . -type f (-path .git -o -path node_modules ) -prune]

Describe the bug
fzf fails to start after a fresh install of zsh-quickstart-kit.

To Reproduce
Steps to reproduce the behavior:

  1. $stow --target="$HOME" zsh on bash
  2. zsh
  3. fzf
  4. fzf produces output: [Command failed: find . -type f ( -path .git -o -path node_modules ) -prune]

Expected behavior
fzf should run.

Screenshots
Self-explanatory one-liner error prompt.

Desktop (please complete the following information):

  • OS/disto: Arch Linux
  • Version: 5.16.12-arch-1-1

Additional context
Problem occurs on a fresh install of Arch Linux.
fzf was installed with sudo pacman -S fzf , with no further configurations.
fzf runs properly on bash and zsh without zsh-quickstart-kit installed.
fzf produces the same error when running in bash started by zsh.
Manually run find . -type f (-path .git -o -path node_modules ) -prune gives an output of zsh: unknown file attribute:

.zgen-setup still points to ~/.zgen/init.zsh instead of ~/.zgenom/init.zsh

Since the switch to fully support zgenom, I was noticing that zgenom save was always being run in Linux whenever a new session was started, even though the files hadn't been modified. I ran zsh with --xtrace and noticed that init.zsh was getting a 0 for modification time and saw that the get_file_modification_time function was still pointing to ~/.zgen/init.zsh instead of ~/.zgenom/init.zsh
Selection_002

Git Clone Issue

git clone [email protected]:unixorn/zsh-quickstart-kit.git
Cloning into 'zsh-quickstart-kit'...
The authenticity of host 'github.com (140.82.113.4)' can't be established.
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'github.com,140.82.113.4' (RSA) to the list of known hosts.
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

use can_haz instead of canhaz

This commit recently introduced support for exa, but may be using canhaz instead of can_haz. Whenever I open a new shell canhaz creates two files (exa and tree) in my working directory.

āÆ which canhaz
canhaz () {
	mkdir -p $(dirname "${1}") && touch "${1}"
}
āÆ which can_haz
can_haz () {
	which "$@" > /dev/null 2>&1
}

/usr/local/bin comes after /usr/bin in PATH variable

which python 

returns /usr/bin/python instead of brewed python, causing package import problems.

Error when opening new terminal:

/usr/bin/python: No module named virtualenvwrapper
virtualenvwrapper.sh: There was a problem running the initialization hooks.

If Python could not import the module virtualenvwrapper.hook_loader,
check that virtualenvwrapper has been installed for
VIRTUALENVWRAPPER_PYTHON=/usr/bin/python and that PATH is
set properly.

Avoid Launching Unnecessary SSHAgents on MacOS

The current version of the .zshrc file creates a new ssh-agent process whenever the load-our-ssh-keys() function is run, which is almost everytime except when on not remote machines.

However, for MacOS platform there is no need to create a new ssh-agent as there should be one already running by the OS. So instead of creating news, you can use the one created by the OS. But to keep this code portable for Zshells on Linux and Windows you have to add in some other code for checks.

I fixed this on my git subtree version of this repo by using some code that I snagged from VS Code docs:

if [ -z "$SSH_AUTH_SOCK" ]; then
   # Check for a currently running instance of the agent
   RUNNING_AGENT="`ps -ax | grep 'ssh-agent -s' | grep -v grep | wc -l | tr -d '[:space:]'`"
   if [ "$RUNNING_AGENT" = "0" ]; then
        # Launch a new instance of the agent
        ssh-agent -s &> .ssh/ssh-agent
   fi
   eval `cat .ssh/ssh-agent`
fi

Will add a MR with this fix.

Stow throws Warning! about targest

Ran through instructions per the readme and got this error when running the stow --target=/Users/YourUsername zsh in the top level of the repo

WARNING! stowing zsh would cause conflicts:
  * existing target is neither a link nor a directory: .zshrc
All operations aborted.

Stuck on zgen setup part of readme

It's not clear to me, when reading the readme on github, that you are supposed to download the quickstart repo, or where would be a good location to download it to.

I read step 2 as referring to the repo downloaded in step 1, but I think it's referring to downloaded version of the quickstart repo..?

Do you have a suggested location to download the quickstart repo?

.zsh_functions:161: defining function based on alias `chgext'

I get the following error every time I open a terminal window

/Users/brian/.zsh_functions:161: defining function based on alias `chgext'
/Users/brian/.zsh_functions:161: parse error near `()'

Made the following change which seems to fix it:

# Batch change extension from $1 to $2
chgext() {
  for file in *.$1
  do
    mv $file $(echo $file | sed "s/\(.*\.\)$1/\1$2/")
  done
}

became

# Batch change extension from $1 to $2
function chgext {
  for file in *.$1
  do
    mv $file $(echo $file | sed "s/\(.*\.\)$1/\1$2/")
  done
}

noisy output from ssh-add on startup

The default behavior for ssh-add is to print all identities found. Using the -q flag silences this and only prints errors, successful operations are hidden.

Broken sourcing from ~/.zshrc.d

.zshrc does not source dotfiles correctly from ~/.zshrc as it doesnt find actual dotfiles.
Reccomended fix (made in #102):

mkdir -p ~/.zshrc.d
# ..... Changes
if [ -n "$(/bin/ls -A ~/.zshrc.d)" ]; then
  for dotfile in $(find ~/.zshrc.d -type f)
# .....
  do
    if [ -r "${dotfile}" ]; then
      source "${dotfile}"
    fi
  done
fi

Use -A swich with ls to list dotfiles and find to enumerate all files (including dotfiles)

zsh-quickstart-kit should either warn fzf not installed or not install fzf-zsh-plugin

I upgraded my zsh-quickstart-kit a few weeks back, and my ^R keybinding has been broken ever since. I finally tracked down the issue, and after much banging of head, it turns out that I didn't have fzf installed. It had been quite awhile since I'd updated zsh-quickstart-kit; the previous version must have been a pre- fzf version.

Maybe the quickstart kit (or the plugin?) should warn that fzf is not installed; or not override the existing bindings, or something?

(fzf is pretty cool at first glance, but it was a frustrating few weeks not having search history!)

Very slow

I installed zsh-quickstart-kit with spf13, and the loading time is very slow. I haven't customized it, so it appears to be the default setting that slows down my system.

Using iTerm2 on OS X 10.11.

I was hoping that zgen would solve slowliness issues I was experiencing with antigen, but that's not the case. Do you have any recommendations for speeding up the system?

Walk through setup/quickstart again to change settings (or toggle them after initially setting up)

Hey,

I started using this quickstart kit to quickly setup ZSH with loads of features, and I absolutely love it!
One thing I did misconfigure though was to have the more compact terminal view:

image

I want to change it back to show the full powerline visual instead of compacting the log of commands previously executed, but I am unsure where to look or where to toggle individual settings.

Is there a way to run the initial setup again, or toggle individual choices that were made during the initial setup?

Removing SSH key echo in .zshrc

I could be missing something but is there a way to do this without modifying .zshrc directly (would rather not)?

I don't currently see anything in source or docs.

Assistance with font's instructions.

Install the patched font in a valid X font path. Valid font paths can be listed with xset q: mv YourChosenPowerlineFont.otf ~/.fonts
Update the font cache for the path the font was installed in (root privileges may be needed for updating the font cache for some paths): fc-cache -vf ~/.fonts/

Can you assist a little more in these instructions. I have installed powerline and nerdfonts. I searched using catfish and only found this one file. PowerlineSymbols.otf in /usr/share/fonts/OTF/

I cannot find anything labled with powerline and file type of otf besides that.

In the past with Arch and installing Oh-My-Zsh I don't recall having to mv powerline fonts to my local fonts. Maybe these instructions do not apply to Arch.

Zgenom OSX plugin is deprecated

Zgenom throws the following error:
-- zgenom: Deleting /Users/jfmcdowell/.zgenom/init.zsh ...
The osx plugin is deprecated and has been renamed to macos.
Please update your .zshrc to use the macos plugin instead.

This is because Oh My ZSH deprecated the plugin.

Powerline warning in new tab

Hello,

I've been using this starter kit for a few days. I love it mainly because of async loading of plugins. Few problems I encountered:

  • I see these logs: Identity added: ... listing down path to my ssh key every time I open a new terminal window. I have added export DONT_PRINT_SSH_KEY_LIST=true in ~/.zshrc.d/my-conf.sh but still see this log.
  • Due to above print output, powerline gives a huge log on every new terminal window that looks like this:
[WARNING]: Console output during zsh initialization detected.
When using Powerlevel10k with instant prompt, console output during zsh
initialization may indicate issues.

You can:

  - Recommended: Change ~/.zshrc so that it does not perform console I/O
    after the instant prompt preamble. See the link below for details.

    * You will not see this error message again.
    * Zsh will start quickly and prompt will update smoothly.

  - Suppress this warning either by running p10k configure or by manually
    defining the following parameter:

      typeset -g POWERLEVEL9K_INSTANT_PROMPT=quiet

    * You will not see this error message again.
    * Zsh will start quickly but prompt will jump down after initialization.

  - Disable instant prompt either by running p10k configure or by manually
    defining the following parameter:

      typeset -g POWERLEVEL9K_INSTANT_PROMPT=off

    * You will not see this error message again.
    * Zsh will start slowly.

  - Do nothing.

    * You will see this error message every time you start zsh.
    * Zsh will start quickly but prompt will jump down after initialization.

I tried adding typeset statement in ~/.zshrc.d/my-conf.sh but that doesn't work..

  • Not sure about this but I always get this warning in startup of Visual Studio Code: Resolving your shell environment is taking very long. Please review your shell configuration.

I'm on OSX Catalina 10.15.7. My zsh version is zsh 5.8 (x86_64-apple-darwin19.6.0)

Default zgen directory to hidden

Hi, thanks for the awesome zsh kit. No doubt this is the best kit around.

I'd like to make a suggestion to use /.zgen instead of zgen, because no point seeing a boilerplate zgen directory for most users.

Problems with load-our-ssh-keys()

Adding ssh keys prints some things to stdout which makes p10k unhappy. Also ssh-agent isnt started by default. Also the find command is missing an -o between id_dsa and id_ecdsa
Recommended fix:

load-our-ssh-keys() {
  eval `ssh-agent -s` &> /dev/null
  # Fun with SSH
  if [ $(ssh-add -l | grep -c "The agent has no identities." ) -eq 1 ]; then
    if [[ "$(uname -s)" == "Darwin" ]]; then
      # macOS allows us to store ssh key pass phrases in the keychain, so try
      # to load ssh keys using pass phrases stored in the macOS keychain.
      #
      # You can use ssh-add -K /path/to/key to store pass phrases into
      # the macOS keychain
      ssh-add -A # load all ssh keys that have pass phrases stored in macOS keychain
    fi

    for key in $(find ~/.ssh -type f -a \( -name '*id_rsa' -o -name '*id_dsa' -o -name '*id_ecdsa' \))
    do
      if [ -f ${key} -a $(ssh-add -l | grep -c "${key//$HOME\//}" ) -eq 0 ]; then
        ssh-add ${key} &> /dev/null
      fi
    done
  fi
}

I would also make DONT_PRINT_SSH_KEY_LIST enabled by default.

MacOS: Deprecated flags in ssh-add

After upgrading to MacOs Monterey I am presented with the following warning:

WARNING: The -K and -A flags are deprecated and have been replaced
by the --apple-use-keychain and --apple-load-keychain
flags, respectively. To suppress this warning, set the
environment variable APPLE_SSH_ADD_BEHAVIOR as described in
the ssh-add(1) manual page.

I believe this warning can be suppressed without the use of the environment variable by changing line 116 in the ZSHRC file with ssh-add --apple-load-keychain

I'll submit a PR for consideration.

Powerlevel10k Startup Wizard opens each terminal launch

Something related to the complex of symlinks included in this startup kit causes P10K to not recognize the config file it places in the home directory on startup, leading it to open the extremely annoying startup wizard each time the terminal is opened, as well as not reading the saved config. I fixed this by placing ./p10k.zsh in my .zshrc.d but this obviously shouldn't be necessary out the box.

I'm on MacOS 11.5.2.

New starter-kit error

New starter kit shows these following errors
-- zgen: Failed to load /home/arafat/.zgen/robbyrussell/oh-my-zsh-master -- oh-my-zsh.sh
And
It has been 17781 days since your zsh quickstart kit was updated Checking for zsh-quickstart-kit updates... ~/.zsh-quickstart-kit-master/zsh ~ fatal: not a git repository (or any of the parent directories): .git No quickstart marker found, is your quickstart a valid git checkout?

Had to modify .zgen-setup to point to proper files

Had to modify these lines:

if [ ! -f ~/zgen/zgen.zsh ]; then
  pushd ~
  git clone [email protected]:tarjoilija/zgen.git
  popd
fi
source ~/zgen/zgen.zsh

To this

if [ ! -f ~/zgen.zsh ]; then
  pushd ~
  git clone [email protected]:tarjoilija/zgen.git
  popd
fi
source ~/zgen.zsh

To get it to work. Stow didn't appear to create a symlink for the zsh folder itself. Is that standard behavior?

Error loading zshrc

After the latest OSX update I'm getting the following error to load my terminal session:

.zshrc:78: parse error near ;'`

Looking at the code this is what I'm seeing on this code block:


 76 if has brew; then
 77   BREW_PREFIX=$(brew --prefix)
 78   if [[ -d "${BREW_PREFIX}/bin"]]; then
 79     export PATH="$PATH:${BREW_PREFIX}/bin"
 80   fi
 81   if [[ -d "${BREW_PREFIX}/sbin"]]; then
 82     export PATH="$PATH:${BREW_PREFIX}/sbin"
 83   fi
 84 fi

OS details:

macOS Big Sur
version 11.3.1

watch command broken

My watch command is broken when using this kit.
It flashes very quickly and is impossible to read.

Do you have similar issues?
Any ideas whats causing this?

Current SSH Keys: Could not open a connection to your authentication agent.

I've installed the quickstart kit. Now whenever I start ZSH I am greeted by the following message:

Current SSH Keys:                                         
Could not open a connection to your authentication agent. 

I'm using Manjaro Linux over ssh. I have verified that ssh-agent is running.

I'd be happy to provide any additional info you need to help troubleshoot this. Thanks for the cool project.

Add 1password ssh-agent support

1Password 8 beta supports storing ssh keys in your 1Password vault. Add support not starting ssh-agent if 1Password is enabled.

Describe the solution you'd like

Detect 1Password ssh and skip ssh-agent launch.

zsh/.zsh_functions 'chgext' function conflicts with default unixorn/jpb.zshplugin 'chgext' alias to 'change-extension' function

Last login: Fri Jan 25 12:35:53 on ttys005
Identity added: /Users/jmcculloch/.ssh/id_rsa (...)
/Users/jmcculloch/.zsh_functions:161: defining function based on alias `chgext'
/Users/jmcculloch/.zsh_functions:161: parse error near `()'

This appears to be conflicting with the chgext alias defined in the plugin unixorn/jpb.zshplugin

zsh/.zgen-setup

  # Add my collection of miscellaneous utility functions.
  zgen load unixorn/jpb.zshplugin
$ grep -r 'change-extension' .
Binary file ./unixorn/jpb.zshplugin-master/.git/index matches
./unixorn/jpb.zshplugin-master/bin/change-extension:# Usage: change-extension jpeg jpg
./unixorn/jpb.zshplugin-master/jpb.plugin.zsh:#   change-extension erb haml
./unixorn/jpb.zshplugin-master/jpb.plugin.zsh:function change-extension() {
./unixorn/jpb.zshplugin-master/jpb.plugin.zsh:alias chgext='change-extension'
./unixorn/jpb.zshplugin-master/README.md:* change-extension - ?

This was resolved with the fix in issue #40 and reintroduced by commit commit 5d2ae03 (Don't use function keyword)

Create mirrors of the base plugins

Make mirrors of the base plugins used by the kit to prevent annoyances like when psprint took all their plugin repos offline from breaking users.

Include some tooling to periodically pull the upstreams and push to the mirrors to keep them from getting stale.

powerlevel 10k keeps appending to .zshrc

Hi there, powerlevel 10k keeps appending the following line to my .zshrc:

POWERLEVEL9K_DISABLE_CONFIGURATION_WIZARD=true

I'm only using powerlevel 10k because it comes with the quickstart kit, and I used the wizard to customize the prompt, but that's it.

symbolic-linked .zgen-local-plugins does not regenerate .zgen/init.zsh

I have my .zgen-local-plugins placed under Dropbox folder. Then I place a symbolic link under my user profile by running the following.

ln ~\Dropbox\zsh\.zgen-local-plugins \Users\me\.zgen-local-plugins

After I had made changes to the file, the file changes was not picked up and no updated init.zsh.

Have to manually run setup-zgen-repos.

[Suggestion] Disable OMZ's built-in auto-update

Since zsh-quickstart-kit includes autoupdate-zgen by default, would you consider adding DISABLE_AUTO_UPDATE=true to the included .zshrc to avoid getting prompted by Oh-My-Zsh to update itself? (Obviously, we can add it to our own custom configurations but it seems like a reasonable inclusion in the default config.) Thanks for your consideration!

.zgen-setup needs to be updated

L69 needs to be updated from:
zgen oh-my-zsh plugins/colored-man
to:
zgen oh-my-zsh plugins/colored-man-pages

following oh-my-zsh's renaming of the plugin

Add a selfupdate command

Add a quickstart-selfupdate command to force an update of the quickstart kit and update the ticket file to reset the timer till the next selfupdate.

n00b question about zgen vs oh-my-zsh

Why does this setup load oh-my-zsh when it already is using zgen?
Cannot zgen alone + straight zsh config provide the same functionality?
I'm asking because people write ohmy is slow. I've read zgen is good, and thats how I found this repo. Is it not an issue anymore?

load-our-ssh-keys() function doesn't work on Arch Linux

I am not sure if this is Arch specific but my ssh key is never loaded during the start-up of a new shell/terminal.

I see output like this:

-- console output produced during zsh initialization follows --

load-our-ssh-keys:6: no such file or directory: .ssh/ssh-agent
cat: .ssh/ssh-agent: No such file or directory
Could not open a connection to your authentication agent.

Current SSH Keys:
Could not open a connection to your authentication agent.

I have tried debugging and because the kit redirects the ssh-add cmd to /dev/null I never see the actual error message:

-- console output produced during zsh initialization follows --

Agent pid 40928
ssh_askpass: exec(/usr/lib/ssh/ssh-askpass): No such file or directory```

If I add the ssh-add command to my config in the ~/.zshrc.d/ folder it gives the same askpass error as above. From reading up on this on a few SO pages its to do with the env var SSH_ASKPASS

I have installed this package but it still fails: community/openssh-askpass 2.1.0-3 [0B 2.61MiB] [Installed]

I found this link on StackExchange, it may be helpful.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.