Skip to content

Commit

Permalink
Merge pull request #2 from z-shell/rename
Browse files Browse the repository at this point in the history
fix: 🐛 Fix incorrect name
  • Loading branch information
ss-o authored Feb 26, 2022
2 parents 27a7e2b + fd75467 commit 892dc56
Show file tree
Hide file tree
Showing 4 changed files with 164 additions and 59 deletions.
116 changes: 112 additions & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,15 +1,123 @@
# Space or Tabs?
# https://stackoverflow.com/questions/35649847/objective-reasons-for-using-spaces-instead-of-tabs-for-indentation
# https://stackoverflow.com/questions/12093748/how-to-use-tabs-instead-of-spaces-in-a-shell-script
#
# 1. What happens when I press the Tab key in my text editor?
# 2. What happens when I request my editor to indent one or more lines?
# 3. What happens when I view a file containing U+0009 HORIZONTAL TAB characters?
#
# Answers:
#
# 1. Pressing the Tab key should indent the current line (or selected lines) one additional level.
# 2. As a secondary alternative, I can also tolerate an editor that,
# like Emacs, uses this key for a context-sensitive fix-my-indentation command.
# 3. Indenting one or more lines should follow the reigning convention, if consensus is sufficiently strong; otherwise,
# I greatly prefer 2-space indentation at each level. U+0009 characters should shift subsequent characters to the next tab stop.
#
# Note: VIM users should use alternate marks [[[ and ]]] as the original ones can confuse nested substitutions, e.g.: ${${${VAR}}}
# # Space or Tabs? https://stackoverflow.com/questions/35649847/objective-reasons-for-using-spaces-instead-of-tabs-for-indentation
#
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
# vim: ft=zsh sw=2 ts=2 et

root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.{md,rst}]
insert_final_newline = false
trim_trailing_whitespace = false

[*.{sh,bash,zsh,fish}]
indent_style = space
indent_size = 2
tab_width = 2

[Makefile]
indent_style = tab
indent_size = 4

[*.{css,less}]
indent_style = space
indent_size = 2

[*.{py,rb}]
indent_style = space
indent_size = 4

[*.{go,java,scala,groovy,kotlin}]
indent_style = tab
indent_size = 4

[*.{js,jsx,html,xml,sass,json,yml,yaml,toml}]
charset = utf-8
indent_style = space
indent_size = 2

[CHANGELOG.md]
indent_style = tab
indent_size = 4# Space or Tabs?
# https://stackoverflow.com/questions/35649847/objective-reasons-for-using-spaces-instead-of-tabs-for-indentation
# https://stackoverflow.com/questions/12093748/how-to-use-tabs-instead-of-spaces-in-a-shell-script
#
# 1. What happens when I press the Tab key in my text editor?
# 2. What happens when I request my editor to indent one or more lines?
# 3. What happens when I view a file containing U+0009 HORIZONTAL TAB characters?
#
# Answers:
#
# 1. Pressing the Tab key should indent the current line (or selected lines) one additional level.
# 2. As a secondary alternative, I can also tolerate an editor that,
# like Emacs, uses this key for a context-sensitive fix-my-indentation command.
# 3. Indenting one or more lines should follow the reigning convention, if consensus is sufficiently strong; otherwise,
# I greatly prefer 2-space indentation at each level. U+0009 characters should shift subsequent characters to the next tab stop.
#
# Note: VIM users should use alternate marks [[[ and ]]] as the original ones can confuse nested substitutions, e.g.: ${${${VAR}}}
#
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
# vim: ft=zsh sw=2 ts=2 et

root = true

[*]
charset = utf-8
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
trim_trailing_whitespace = true

[*.{md,rst}]
insert_final_newline = false
trim_trailing_whitespace = false

[*.{sh,bash,zsh,fish}]
indent_style = space
indent_size = 2
tab_width = 2

[Makefile]
indent_style = tab
indent_size = 4

[*.{css,less}]
indent_style = space
indent_size = 2

[*.{py,rb}]
indent_style = space
indent_size = 4

[*.{go,java,scala,groovy,kotlin}]
indent_style = tab
indent_size = 4

[*.{js,jsx,html,xml,sass,json,yml,yaml,toml}]
charset = utf-8
indent_style = space
indent_size = 2

[**.{md,rst}]
trim_trailing_whitespace = false
[CHANGELOG.md]
indent_style = tab
indent_size = 4
5 changes: 1 addition & 4 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,12 @@
❮ ZI ❯ - Console
</h2>

- [Introduction](#introduction)
- [Usage](#usage)
- [Screencast](#screencast)
- [Installation](#installation)
- [Solving The Lack Of `zsh/curses` Module With ZI](#solving-the-lack-of-zshcurses-module-with-zi)

### Introduction

A consolette for [ZI](https://github.com/z-shell/zi) – based on the `zsh/zcurses` Zshell module allows the user to:
A console for [ZI](https://github.com/z-shell/zi) – based on the `zsh/zcurses` Zshell module allows the user to:

> Prerequisities: [ZUI](https://github.com/z-shell/zui) library
Expand Down
10 changes: 5 additions & 5 deletions zi-console.plugin.zsh
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
#
# No plugin manager is needed to use this file. All that is needed is adding:
# source {where-zinit-view-is}/zinit-view.plugin.zsh
# source {where-zi-view-is}/zi-view.plugin.zsh
#
# to ~/.zshrc. But of course, this plugin is an extension to ZI.
#

# Standarized $0 handling
# http://z-shell.github.io/zinit/wiki/zsh-plugin-standard/
# https://z.digitalclouds.dev/community/intro
0="${${ZERO:-${0:#$ZSH_ARGZERO}}:-${(%):-%N}}"
0="${${(M)0:#/*}:-$PWD/$0}"

typeset -gA Plugins
Plugins[ZICONSOLE_REPO_DIR]="${0:h}"

if [[ "${+functions[-zui_std_cleanup]}" = "0" ]]; then
echo "The zinit consolette uses ZUI plugin, please load https://github.com/z-shell/zui/ with your plugin manager, or source it."
echo "The zi consolette uses ZUI plugin, please load https://github.com/z-shell/zui/ with your plugin manager, or source it."
fi

#
# Update FPATH if:
# 1. Not loading with Zplugin or other plugin manager supporting the plugin standard
# 1. Not loading with ZI or other plugin manager supporting the plugin standard
# 2. Not having fpath already updated (that would equal: using other plugin manager)
#

if [[ $zsh_loaded_plugins[-1] != */zinit-console && -z $fpath[(r)${0:h}] ]]
if [[ $zsh_loaded_plugins[-1] != */zi-console && -z $fpath[(r)${0:h}] ]]
then
fpath+=( "${0:h}" )
fi
Expand Down
Loading

0 comments on commit 892dc56

Please sign in to comment.