Comments (7)
@deetuned I broke out yubikey ssh handling as #267.
from zsh-quickstart-kit.
Good idea. They started slowly accumulating. For backwards compatibility we should leave the local plugins in ~
, everything else can go into ~/zqs-configuration
from zsh-quickstart-kit.
I could add migration. For example, if there is no end directory, then we have the old location of the settings and we can migrate everything. We would end up with just one check for this.
I was also thinking that we could add a coloring of the output to accentuate certain events for users.
from zsh-quickstart-kit.
I've actually been maintaining a fork since November that more or less does what @neiromaster is requesting. If the user has specifically gone out of their way to set $ZDOTDIR
in ~/.zshenv
and the fleet of $XDG_*_HOME
variables, then all quickstart kit files (barring ~/.fzf/
and ~/.fzf.zsh
) are decluttered from $HOME
. If these variables are unset, then just operate on $HOME
like before. Keeps everything simple and in plain site for new users who wouldn't have such variables set, while allowing powerusers to explicitly control their files.
Let's assume the user has set ZDOTDIR=~/.config/zsh
, XDG_DATA_HOME=~/.local/share
, and XDG_CACHE_HOME=~/.cache
.
In ~/.config/zsh/
:
.p10k.zsh
.zqs/
.zshrc.d/
.zshrc.pre-plugins.d/
.iterm2_shell_integration.zsh
.zcompdump*
and.zcomp/
(completions).zcache/
.zgen-setup
.zsh_history
.zprofile
(if needed for extra$PATH
changes)1.zsh_aliases
.zsh_functions
In ~/.config/zsh/.zqs/
(examples):
zsh-quickstart-kit-prompt-switch-warning
zsh-quickstart-last-update
zqs-settings/
In ~/.config/zsh/.zqs/zqs-settings/
:
list-ssh-keys
load-ssh-keys
2- Etc.
In ~/.cache/
:
p10k-instant-prompt-*.zsh
(instant prompt)
In ~/.local/share/
:
.zqs-zgenom/
.zgenom/
The reason for organising where the quickstart kit's configurations are stored (and keeping zgenom, plugins and friends away from the configurations) is so that I can have any big or small change made to either the fork itself or my shell dotfiles (zsh, NeoVim, etc.) instantly and automatically propagate to every one of my machines
Unfortunately, I am by no means a trained developer. Most of the implementation relies on painfully simple abuse of ${ZDOTIDR:-$HOME}/<path>
in all file checks or operations. Ideally, I'd define a variable in .zprofile
or at the top of .zshrc
that sets the required quickstart-kit-related directories with a few initial checks. And when operating on the ~/config/zsh/.zshrc.d
/~/.config/zsh/.zqs/STUFF
/~/local/share/.zgenom
/etc. files, I'd check if we're using $ZDOTDIR
and friends then remove the leading .
s (or just set them at the top as well). The fork is just a personal hack. But I stumbled across this open issue and figured I'd engage in the discussion. I, too, would like it all to be just a little bit more organised.
Feel free to see the changes here, but please wear eye protection; it's dangerous in there: deetuned/zsh-quickstart-kit/tree/dev
P.S Thank you for all your hard work on this kit, @unixorn!
Footnotes
-
When trying to prepend your $PATH in order to put custom- or user-installed search paths first,
.zshrc.d
won't cut it on macOS because it's loaded after.zshrc
and as such Apple forces their directories at the start of$PATH
.$ZDOTDIR/.zprofile
is the only way I can override Apple's built-in shell commands/binaries. ↩ -
I added a check in the quickstart kit's
.zshrc
for theload-ssh-keys
setting. If the setting isfalse
, then don't load keys usingssh-add
. GNU doesn't have--apple-load-keychain
and I usegpg-agent
with a YubiKey anyway. ↩
from zsh-quickstart-kit.
That was incredibly quick, and greatly appreciated!
Cheers! :)
from zsh-quickstart-kit.
@unixorn, how would you feel about me using @deetuned's suggested folders to store zqs configuration?
from zsh-quickstart-kit.
I think it'd be a good idea. I haven't had time to start work on it, so if you do, go ahead. Make it default to using ~
so we don't break existing installs, and there should be a zqs command to migrate the settings to the new directory structure.
I'm going to add a bin
dir to store one-use commands like that so that they can be standalone scripts and not add to the size of .zshrc
and increase start time for new sessions.
from zsh-quickstart-kit.
Related Issues (20)
- [BUG] /home/yen/.zshrc:718: parse error near `)'
- Expose enable/disable of `autoload -U zmv` as a `zqs` command
- [BUG] Check to see if monterey is installed is incorrect HOT 5
- Add `zqs enable|disable ssh-key-listing` commands
- [BUG] Typo in enable-ssh-ask-passphrase function. :facepalm:
- [BUG] Prompt asks to install ssh-askpass on macos ventura HOT 1
- OMZ: pasting speed / automatic changing of pasted URLs / DISABLE_MAGIC_FUNCTIONS=true is not respected HOT 1
- [BUG] command not found: zgenom HOT 1
- Move the various `zqs-{enable,disable}-xyz` commands into proper commands
- Add `zqs cleanup` command
- Zi as framework HOT 1
- [BUG] SSH-agent is completely broken when 1Password CLI is installed on Linux HOT 7
- Add a `use-yubikey-for-ssh` setting
- Add a `bin` directory
- Suggestion: Copy some ideas from a similar project called rad-shell
- remove `Agent PID 12345` HOT 1
- [BUG] cannot surpress p10k warning console output HOT 1
- Support adding extra subsets of plugins based on a machine's type HOT 1
- Make alias tips toggleable
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zsh-quickstart-kit.