Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
b79fba7b
Unverified
Commit
b79fba7b
authored
Aug 10, 2021
by
Gregor Trefs
Committed by
GitHub
Aug 10, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(plugins): `octozen` shows an Octocat zen quote on startup (#5959)
Co-authored-by:
Marc Cornellà
<
hello@mcornella.com
>
parent
bca73e18
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
0 deletions
+23
-0
README.md
plugins/octozen/README.md
+12
-0
octozen.plugin.zsh
plugins/octozen/octozen.plugin.zsh
+11
-0
No files found.
plugins/octozen/README.md
0 → 100644
View file @
b79fba7b
# Octozen plugin
Displays a zen quote from GitHub's Octocat on start up.
To use it, add
`octozen`
to the plugins array in your zshrc file:
```
zsh
plugins
=(
... octozen
)
```
It defines a
`display_octozen`
function that fetches a GitHub Octocat zen quote.
NOTE: Internet connection is required (will time out if not fetched in 2 seconds).
plugins/octozen/octozen.plugin.zsh
0 → 100644
View file @
b79fba7b
# octozen plugin
# Displays a zen quote from octocat
function
display_octozen
()
{
curl
-m
2
-fsL
"https://api.github.com/octocat"
add-zsh-hook
-d
precmd display_octozen
}
# Display the octocat on the first precmd, after the whole starting process has finished
autoload
-Uz
add-zsh-hook
add-zsh-hook precmd display_octozen
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment