Showing preview only (2,516K chars total). Download the full file or copy to clipboard to get everything.
Repository: donnemartin/gitsome
Branch: master
Commit: d7c57abc7cb6
Files: 357
Total size: 2.3 MB
Directory structure:
gitextract_f42mvrxs/
├── .gitignore
├── .gitsomeconfig
├── .gitsomeconfigurl
├── .travis.yml
├── CHANGELOG.md
├── CHANGELOG.rst
├── CHECKLIST.md
├── COMMANDS.md
├── CONTRIBUTING.md
├── Dockerfile
├── LICENSE.txt
├── PRIVACY.md
├── README.md
├── TOS.md
├── appveyor.yml
├── codecov.yml
├── gitsome/
│ ├── __init__.py
│ ├── compat.py
│ ├── completer.py
│ ├── completions.py
│ ├── completions_git.py
│ ├── config.py
│ ├── formatter.py
│ ├── github.py
│ ├── githubcli.py
│ ├── main.py
│ ├── main_cli.py
│ ├── rss_feed.py
│ ├── table.py
│ ├── utils.py
│ ├── view_entry.py
│ └── web_viewer.py
├── requirements-dev.txt
├── scripts/
│ ├── aws_complete.sh
│ ├── create_changelog.sh
│ ├── create_readme_rst.sh
│ ├── gh_complete.sh
│ ├── gitsome
│ ├── gitsome.bat
│ ├── run_code_checks.sh
│ ├── set_changelog_as_readme.sh
│ ├── set_changelog_as_readme_undo.sh
│ ├── update_docs.sh
│ ├── upload_pypi.sh
│ ├── xonsh
│ └── xonsh.bat
├── setup.py
├── tests/
│ ├── __init__.py
│ ├── compat.py
│ ├── data/
│ │ ├── __init__.py
│ │ ├── email.py
│ │ ├── emoji.py
│ │ ├── events.py
│ │ ├── gitignores.py
│ │ ├── issue.py
│ │ ├── license.py
│ │ ├── markdown.py
│ │ ├── thread.py
│ │ ├── trends.p
│ │ ├── trends.py
│ │ ├── user.py
│ │ ├── user_feed.p
│ │ ├── user_feed.py
│ │ └── user_public_feed.p
│ ├── mock_feed_parser.py
│ ├── mock_github_api.py
│ ├── mock_pretty_date_time.py
│ ├── run_tests.py
│ ├── test_completer.py
│ ├── test_config.py
│ ├── test_github.py
│ ├── test_github_cli.py
│ └── test_web_viewer.py
├── tox.ini
└── xonsh/
├── __init__.py
├── __main__.py
├── aliases.py
├── ansi_colors.py
├── ast.py
├── base_shell.py
├── built_ins.py
├── codecache.py
├── color_tools.py
├── commands_cache.py
├── completer.py
├── completers/
│ ├── __init__.py
│ ├── _aliases.py
│ ├── base.py
│ ├── bash.py
│ ├── bash_completion.py
│ ├── commands.py
│ ├── completer.py
│ ├── dirs.py
│ ├── init.py
│ ├── man.py
│ ├── path.py
│ ├── pip.py
│ ├── python.py
│ ├── tools.py
│ └── xompletions.py
├── contexts.py
├── data/
│ └── data.txt
├── diff_history.py
├── dirstack.py
├── dumb_shell.py
├── environ.py
├── events.py
├── execer.py
├── foreign_shells.py
├── fs.py
├── history/
│ ├── __init__.py
│ ├── base.py
│ ├── dummy.py
│ ├── json.py
│ ├── main.py
│ └── sqlite.py
├── imphooks.py
├── inspectors.py
├── jobs.py
├── jsonutils.py
├── jupyter_kernel.py
├── jupyter_shell.py
├── lazyasd.py
├── lazyimps.py
├── lazyjson.py
├── lexer.py
├── macutils.py
├── main.py
├── openpy.py
├── parser.py
├── parsers/
│ ├── __init__.py
│ ├── base.py
│ ├── context_check.py
│ ├── v34.py
│ ├── v35.py
│ └── v36.py
├── platform.py
├── ply/
│ ├── .gitignore
│ ├── .travis.yml
│ ├── CHANGES
│ ├── CONTRIBUTING.md
│ ├── Makefile
│ ├── README.md
│ ├── __init__.py
│ ├── doc/
│ │ ├── internal.html
│ │ ├── makedoc.py
│ │ └── ply.html
│ ├── example/
│ │ ├── BASIC/
│ │ │ ├── README
│ │ │ ├── basic.py
│ │ │ ├── basiclex.py
│ │ │ ├── basiclog.py
│ │ │ ├── basinterp.py
│ │ │ ├── basparse.py
│ │ │ ├── dim.bas
│ │ │ ├── func.bas
│ │ │ ├── gcd.bas
│ │ │ ├── gosub.bas
│ │ │ ├── hello.bas
│ │ │ ├── linear.bas
│ │ │ ├── maxsin.bas
│ │ │ ├── powers.bas
│ │ │ ├── rand.bas
│ │ │ ├── sales.bas
│ │ │ ├── sears.bas
│ │ │ ├── sqrt1.bas
│ │ │ └── sqrt2.bas
│ │ ├── GardenSnake/
│ │ │ ├── GardenSnake.py
│ │ │ └── README
│ │ ├── README
│ │ ├── ansic/
│ │ │ ├── README
│ │ │ ├── clex.py
│ │ │ └── cparse.py
│ │ ├── calc/
│ │ │ └── calc.py
│ │ ├── calcdebug/
│ │ │ └── calc.py
│ │ ├── calceof/
│ │ │ └── calc.py
│ │ ├── classcalc/
│ │ │ └── calc.py
│ │ ├── cleanup.sh
│ │ ├── closurecalc/
│ │ │ └── calc.py
│ │ ├── hedit/
│ │ │ └── hedit.py
│ │ ├── newclasscalc/
│ │ │ └── calc.py
│ │ ├── optcalc/
│ │ │ ├── README
│ │ │ └── calc.py
│ │ ├── unicalc/
│ │ │ └── calc.py
│ │ └── yply/
│ │ ├── README
│ │ ├── ylex.py
│ │ ├── yparse.py
│ │ └── yply.py
│ ├── ply/
│ │ ├── __init__.py
│ │ ├── cpp.py
│ │ ├── ctokens.py
│ │ ├── lex.py
│ │ ├── yacc.py
│ │ └── ygen.py
│ ├── setup.md
│ └── test/
│ ├── README
│ ├── calclex.py
│ ├── cleanup.sh
│ ├── lex_closure.py
│ ├── lex_doc1.py
│ ├── lex_dup1.py
│ ├── lex_dup2.py
│ ├── lex_dup3.py
│ ├── lex_empty.py
│ ├── lex_error1.py
│ ├── lex_error2.py
│ ├── lex_error3.py
│ ├── lex_error4.py
│ ├── lex_hedit.py
│ ├── lex_ignore.py
│ ├── lex_ignore2.py
│ ├── lex_literal1.py
│ ├── lex_literal2.py
│ ├── lex_literal3.py
│ ├── lex_many_tokens.py
│ ├── lex_module.py
│ ├── lex_module_import.py
│ ├── lex_object.py
│ ├── lex_opt_alias.py
│ ├── lex_optimize.py
│ ├── lex_optimize2.py
│ ├── lex_optimize3.py
│ ├── lex_optimize4.py
│ ├── lex_re1.py
│ ├── lex_re2.py
│ ├── lex_re3.py
│ ├── lex_rule1.py
│ ├── lex_rule2.py
│ ├── lex_rule3.py
│ ├── lex_state1.py
│ ├── lex_state2.py
│ ├── lex_state3.py
│ ├── lex_state4.py
│ ├── lex_state5.py
│ ├── lex_state_noerror.py
│ ├── lex_state_norule.py
│ ├── lex_state_try.py
│ ├── lex_token1.py
│ ├── lex_token2.py
│ ├── lex_token3.py
│ ├── lex_token4.py
│ ├── lex_token5.py
│ ├── lex_token_dup.py
│ ├── pkg_test1/
│ │ ├── __init__.py
│ │ └── parsing/
│ │ ├── __init__.py
│ │ ├── calclex.py
│ │ └── calcparse.py
│ ├── pkg_test2/
│ │ ├── __init__.py
│ │ └── parsing/
│ │ ├── __init__.py
│ │ ├── calclex.py
│ │ └── calcparse.py
│ ├── pkg_test3/
│ │ ├── __init__.py
│ │ ├── generated/
│ │ │ └── __init__.py
│ │ └── parsing/
│ │ ├── __init__.py
│ │ ├── calclex.py
│ │ └── calcparse.py
│ ├── pkg_test4/
│ │ ├── __init__.py
│ │ └── parsing/
│ │ ├── __init__.py
│ │ ├── calclex.py
│ │ └── calcparse.py
│ ├── pkg_test5/
│ │ ├── __init__.py
│ │ └── parsing/
│ │ ├── __init__.py
│ │ ├── calclex.py
│ │ └── calcparse.py
│ ├── pkg_test6/
│ │ ├── __init__.py
│ │ └── parsing/
│ │ ├── __init__.py
│ │ ├── calclex.py
│ │ ├── calcparse.py
│ │ ├── expression.py
│ │ └── statement.py
│ ├── test_cpp_nonascii.c
│ ├── testcpp.py
│ ├── testlex.py
│ ├── testyacc.py
│ ├── yacc_badargs.py
│ ├── yacc_badid.py
│ ├── yacc_badprec.py
│ ├── yacc_badprec2.py
│ ├── yacc_badprec3.py
│ ├── yacc_badrule.py
│ ├── yacc_badtok.py
│ ├── yacc_dup.py
│ ├── yacc_error1.py
│ ├── yacc_error2.py
│ ├── yacc_error3.py
│ ├── yacc_error4.py
│ ├── yacc_error5.py
│ ├── yacc_error6.py
│ ├── yacc_error7.py
│ ├── yacc_inf.py
│ ├── yacc_literal.py
│ ├── yacc_misplaced.py
│ ├── yacc_missing1.py
│ ├── yacc_nested.py
│ ├── yacc_nodoc.py
│ ├── yacc_noerror.py
│ ├── yacc_nop.py
│ ├── yacc_notfunc.py
│ ├── yacc_notok.py
│ ├── yacc_prec1.py
│ ├── yacc_rr.py
│ ├── yacc_rr_unused.py
│ ├── yacc_simple.py
│ ├── yacc_sr.py
│ ├── yacc_term1.py
│ ├── yacc_unicode_literals.py
│ ├── yacc_unused.py
│ ├── yacc_unused_rule.py
│ ├── yacc_uprec.py
│ └── yacc_uprec2.py
├── pretty.py
├── proc.py
├── prompt/
│ ├── __init__.py
│ ├── base.py
│ ├── cwd.py
│ ├── env.py
│ ├── gitstatus.py
│ ├── job.py
│ └── vc.py
├── ptk/
│ ├── __init__.py
│ ├── completer.py
│ ├── history.py
│ ├── key_bindings.py
│ ├── shell.py
│ └── shortcuts.py
├── ptk2/
│ ├── __init__.py
│ ├── completer.py
│ ├── history.py
│ ├── key_bindings.py
│ └── shell.py
├── pyghooks.py
├── pygments_cache.py
├── pytest_plugin.py
├── readline_shell.py
├── replay.py
├── shell.py
├── style_tools.py
├── timings.py
├── tokenize.py
├── tools.py
├── tracer.py
├── winutils.py
├── wizard.py
├── xonfig.py
├── xonshrc
├── xontribs.json
├── xontribs.py
└── xoreutils/
├── __init__.py
├── _which.py
├── cat.py
├── echo.py
├── pwd.py
├── tee.py
├── tty.py
├── uptime.py
├── util.py
├── which.py
└── yes.py
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover
.hypothesis/
# Translations
*.mo
*.pot
# Django stuff:
*.log
# Sphinx documentation
docs/_build/
# PyBuilder
target/
#Ipython Notebook
.ipynb_checkpoints
# temporary files from vim and emacs
*~
*#
.#*
*.swp
*.swo
# Virtualenv
pip-selfcheck.json
bin/
include/
# Mac
.DS_Store
* Misc
scratch/
*.egg-info/
*.pyc
*.out
*.xcf
recipe/
.binstar.yml
binstar.yml
.landscape.yaml
.cache/
build/
dist/
gitsome.egg-info/
docs/_build/
.tox/
lexer_table.py
parser_table.py
parser_test_table.py
gitsome/lexer_table.py
gitsome/parser_table.py
tests/lexer_table.py
tests/parser_table.py
tests/lexer_test_table.py
tests/parser_test_table.py
================================================
FILE: .gitsomeconfig
================================================
[github]
user_login = None
enable_avatar = True
verify_ssl = True
clr_primary = None
clr_secondary = green
clr_tertiary = cyan
clr_quaternary = yellow
clr_bold = cyan
clr_code = red
clr_error = red
clr_header = yellow
clr_link = green
clr_list = cyan
clr_message = None
clr_num_comments = green
clr_num_points = green
clr_tag = cyan
clr_time = yellow
clr_title = None
clr_tooltip = None
clr_user = cyan
clr_view_link = magenta
clr_view_index = magenta
================================================
FILE: .gitsomeconfigurl
================================================
[url]
url_list = ['https://github.com/octocat/spoon-knife']
================================================
FILE: .travis.yml
================================================
language: python
matrix:
include:
- python: 3.5
env: TOXENV=py35
- python: 3.6
env: TOXENV=py36
- python: 3.7
dist: xenial # required for Python >= 3.7
env: TOXENV=py37
install:
- travis_retry pip install codecov tox
script:
- tox
after_success:
- codecov
================================================
FILE: CHANGELOG.md
================================================

gitsome
=======
[](https://travis-ci.org/donnemartin/gitsome) [](https://codecov.io/github/donnemartin/gitsome)
[](http://badge.fury.io/py/gitsome) [](https://pypi.python.org/pypi/gitsome/) [](http://www.apache.org/licenses/LICENSE-2.0.html)
To view the latest `README`, `docs`, and `code`, visit the GitHub repo:
https://github.com/donnemartin/gitsome
To submit bugs or feature requests, visit the issue tracker:
https://github.com/donnemartin/gitsome/issues
Changelog
=========
0.8.0 (2019-04-07)
------------------
This version adds support for Python 3.7.
### Updates
* [#160](https://github.com/donnemartin/gitsome/pull/160) - Add Python 3.7 support. Fixes [#152](https://github.com/donnemartin/gitsome/pull/152), [#144](https://github.com/donnemartin/gitsome/pull/144), [#126](https://github.com/donnemartin/gitsome/pull/126), [#105](https://github.com/donnemartin/gitsome/pull/105) and several other related bugs.
* [#147](https://github.com/donnemartin/gitsome/pull/148) - Gracefully ignore missing avatar image, by [kBite](https://github.com/kBite).
* [#142](https://github.com/donnemartin/gitsome/pull/142) - Update release checklist.
* [#134](https://github.com/donnemartin/gitsome/pull/134) - Update GitHub integrations link.
* [#120](https://github.com/donnemartin/gitsome/pull/120) - Add license disclaimer.
### Bug Fixes
* [#151](https://github.com/donnemartin/gitsome/pull/151) - Fix gh command typos in docs, by [cyblue9](https://github.com/cyblue9).
* [#137](https://github.com/donnemartin/gitsome/pull/137) - Fix Running as a Docker Container anchor in README, by [kamontat](https://github.com/kamontat).
* [#129](https://github.com/donnemartin/gitsome/pull/129) - Fix trending command to handle empty summaries, by [emres](https://github.com/emres).
* [#123](https://github.com/donnemartin/gitsome/pull/123) - Remove buggy codecov badge.
* [#117](https://github.com/donnemartin/gitsome/pull/117) - Fix 0.7.0 CHANGELOG date, by [dbaio](https://github.com/dbaio).
0.7.0 (2017-03-26)
------------------
### Features
* [#99](https://github.com/donnemartin/gitsome/pull/99) - Add Dockerfile to run gitsome in a Docker container, by [l0rd](https://github.com/l0rd) and [larson004](https://github.com/larson004).
### Bug Fixes
* [#67](https://github.com/donnemartin/gitsome/pull/67) - Fix `gh_issues` typo in the `README`, by [srisankethu](https://github.com/srisankethu).
* [#69](https://github.com/donnemartin/gitsome/pull/69) - Fix `--issue_filter` typo for `gh_issues` command in `COMMANDS.md`.
* [#80](https://github.com/donnemartin/gitsome/pull/80) - Fix path for auto completions in `README`.
* [#92](https://github.com/donnemartin/gitsome/pull/92) - Fix viewing HTML contents in the terminal for GitHub Enterprise users, by [dongweiming](https://github.com/dongweiming).
* [#97](https://github.com/donnemartin/gitsome/pull/97) - Fix error hint from `gh gitignores` to `gh gitignore-templates`, by [zYeoman](https://github.com/zYeoman).
* [#116](https://github.com/donnemartin/gitsome/pull/116) - Fix gh trending command resulting in an error.
### Updates
* [#58](https://github.com/donnemartin/gitsome/pull/58) - Tweak `README` intro, add logo.
* [#74](https://github.com/donnemartin/gitsome/pull/74) - Add link to official GitHub integration page in `README`.
* [#79](https://github.com/donnemartin/gitsome/pull/79) - Only store password in config for GitHub Enterprise (due to Enterprise limitations), by [nttibbetts](https://github.com/nttibbetts).
* [#86](https://github.com/donnemartin/gitsome/pull/86) - Update dependency info for `uritemplate`.
* [#89](https://github.com/donnemartin/gitsome/pull/89) - Fix a bug listing info on repos without a desc field, by [SanketDG](https://github.com/SanketDG).
* [#98](https://github.com/donnemartin/gitsome/pull/98) - Prefer GitHub Enterprise token before password.
* [#104](https://github.com/donnemartin/gitsome/pull/104) - Update install instructions to use pip3.
* [#111](https://github.com/donnemartin/gitsome/pull/111) - Add note about current Python 3.6 incompatibility.
* [#115](https://github.com/donnemartin/gitsome/pull/115) - Set current Python support to 3.4 and 3.5.
0.6.0 (2016-05-29)
------------------
### Features
* [#3](https://github.com/donnemartin/gitsome/issues/3) - Add GitHub Enterprise support.
* [#33](https://github.com/donnemartin/gitsome/issues/33) - Revamp the info shown with the `gh feed` command.
### Bug Fixes
* [#30](https://github.com/donnemartin/gitsome/issues/30) - Fix a typo in the `pip3` install instructions.
* [#39](https://github.com/donnemartin/gitsome/issues/39) - Fix `gh feed` `-pr/--private` flag in docs.
* [#40](https://github.com/donnemartin/gitsome/issues/40) - Fix `create-issue` `NoneType` error if no `-b/--body` is specified.
* [#46](https://github.com/donnemartin/gitsome/issues/46) - Fix `gh view` with the -b/--browser option only working for repos, not for issues or PRs.
* [#48](https://github.com/donnemartin/gitsome/issues/48) - Fix `create-repo` `NoneType` error if no `-d/--description` is specified.
* [#54](https://github.com/donnemartin/gitsome/pull/54) - Update to `prompt-toolkit` 1.0.0, which includes performance improvements (especially noticeable on Windows) and bug fixes.
* Fix `Config` docstrings.
### Updates
* [#26](https://github.com/donnemartin/gitsome/issues/26), [#32](https://github.com/donnemartin/gitsome/issues/32) - Add copyright notices for third
party libraries.
* [#44](https://github.com/donnemartin/gitsome/pull/44), [#53](https://github.com/donnemartin/gitsome/pull/53) - Update packaging dependencies based on semantic versioning.
* Tweak `README` intro.
0.5.0 (2016-05-15)
------------------
### Features
* [#12](https://github.com/donnemartin/gitsome/issues/12) - Allow 2FA-enabled users to log in with a password + 2FA code. Previously 2FA-enabled users could only log in with a [personal access token](https://github.com/settings/tokens). Also includes an update of login prompts to improve clarity.
### Bug Fixes
* [#16](https://github.com/donnemartin/gitsome/pull/16), [#28](https://github.com/donnemartin/gitsome/pull/28) - Fix typos in README.
* [#18](https://github.com/donnemartin/gitsome/pull/18) - Fix dev install instructions in README.
* [#24](https://github.com/donnemartin/gitsome/pull/24) - Fix style guide broken link in CONTRIBUTING.
### Updates
* [#1](https://github.com/donnemartin/gitsome/issues/1) - Add Codecov coverage testing status to README.
* [#2](https://github.com/donnemartin/gitsome/issues/2) - Add note about enabling Zsh completions to README.
* [#4](https://github.com/donnemartin/gitsome/issues/4) - Add note about using `pip3` to README.
* [#5](https://github.com/donnemartin/gitsome/issues/5) - Decrease speed of README gif.
* [#6](https://github.com/donnemartin/gitsome/pull/6) - Update url for `click`.
* [#20](https://github.com/donnemartin/gitsome/issues/20) - Add note about enabling more completions to README.
* [#21](https://github.com/donnemartin/gitsome/issues/21) - Bump up `prompt-toolkit` version from `0.51` to `0.52`.
* [#26](https://github.com/donnemartin/gitsome/issues/26) - Add `xonsh` copyright notice to LICENSE.
* [#32](https://github.com/donnemartin/gitsome/pull/32) - Add `github3.py`, `html2text`, and `img2txt` copyright notices to LICENSE.
* Update installation instructions in README.
* Update color customization discussion in README.
0.4.0 (2016-05-09)
------------------
* Initial release.
================================================
FILE: CHANGELOG.rst
================================================
.. figure:: http://i.imgur.com/0SXZ90y.gif
:alt:
gitsome
=======
|Build Status| |Codecov|
|PyPI version| |PyPI| |License|
To view the latest ``README``, ``docs``, and ``code``, visit the GitHub
repo:
https://github.com/donnemartin/gitsome
To submit bugs or feature requests, visit the issue tracker:
https://github.com/donnemartin/gitsome/issues
Changelog
=========
0.8.0 (2019-04-07)
------------------
This version adds support for Python 3.7.
Updates
~~~~~~~
- `#160 <https://github.com/donnemartin/gitsome/pull/160>`__ - Add
Python 3.7 support. Fixes
`#152 <https://github.com/donnemartin/gitsome/pull/152>`__,
`#144 <https://github.com/donnemartin/gitsome/pull/144>`__,
`#126 <https://github.com/donnemartin/gitsome/pull/126>`__,
`#105 <https://github.com/donnemartin/gitsome/pull/105>`__ and
several other related bugs.
- `#147 <https://github.com/donnemartin/gitsome/pull/148>`__ -
Gracefully ignore missing avatar image, by
`kBite <https://github.com/kBite>`__.
- `#142 <https://github.com/donnemartin/gitsome/pull/142>`__ - Update
release checklist.
- `#134 <https://github.com/donnemartin/gitsome/pull/134>`__ - Update
GitHub integrations link.
- `#120 <https://github.com/donnemartin/gitsome/pull/120>`__ - Add
license disclaimer.
Bug Fixes
~~~~~~~~~
- `#151 <https://github.com/donnemartin/gitsome/pull/151>`__ - Fix gh
command typos in docs, by `cyblue9 <https://github.com/cyblue9>`__.
- `#137 <https://github.com/donnemartin/gitsome/pull/137>`__ - Fix
Running as a Docker Container anchor in README, by
`kamontat <https://github.com/kamontat>`__.
- `#129 <https://github.com/donnemartin/gitsome/pull/129>`__ - Fix
trending command to handle empty summaries, by
`emres <https://github.com/emres>`__.
- `#123 <https://github.com/donnemartin/gitsome/pull/123>`__ - Remove
buggy codecov badge.
- `#117 <https://github.com/donnemartin/gitsome/pull/117>`__ - Fix
0.7.0 CHANGELOG date, by `dbaio <https://github.com/dbaio>`__.
0.7.0 (2017-03-26)
------------------
Features
~~~~~~~~
- `#99 <https://github.com/donnemartin/gitsome/pull/99>`__ - Add
Dockerfile to run gitsome in a Docker container, by
`l0rd <https://github.com/l0rd>`__ and
`larson004 <https://github.com/larson004>`__.
Bug Fixes
~~~~~~~~~
- `#67 <https://github.com/donnemartin/gitsome/pull/67>`__ - Fix
``gh_issues`` typo in the ``README``, by
`srisankethu <https://github.com/srisankethu>`__.
- `#69 <https://github.com/donnemartin/gitsome/pull/69>`__ - Fix
``--issue_filter`` typo for ``gh_issues`` command in ``COMMANDS.md``.
- `#80 <https://github.com/donnemartin/gitsome/pull/80>`__ - Fix path
for auto completions in ``README``.
- `#92 <https://github.com/donnemartin/gitsome/pull/92>`__ - Fix
viewing HTML contents in the terminal for GitHub Enterprise users, by
`dongweiming <https://github.com/dongweiming>`__.
- `#97 <https://github.com/donnemartin/gitsome/pull/97>`__ - Fix error
hint from ``gh gitignores`` to ``gh gitignore-templates``, by
`zYeoman <https://github.com/zYeoman>`__.
- `#116 <https://github.com/donnemartin/gitsome/pull/116>`__ - Fix gh
trending command resulting in an error.
Updates
~~~~~~~
- `#58 <https://github.com/donnemartin/gitsome/pull/58>`__ - Tweak
``README`` intro, add logo.
- `#74 <https://github.com/donnemartin/gitsome/pull/74>`__ - Add link
to official GitHub integration page in ``README``.
- `#79 <https://github.com/donnemartin/gitsome/pull/79>`__ - Only store
password in config for GitHub Enterprise (due to Enterprise
limitations), by `nttibbetts <https://github.com/nttibbetts>`__.
- `#86 <https://github.com/donnemartin/gitsome/pull/86>`__ - Update
dependency info for ``uritemplate``.
- `#89 <https://github.com/donnemartin/gitsome/pull/89>`__ - Fix a bug
listing info on repos without a desc field, by
`SanketDG <https://github.com/SanketDG>`__.
- `#98 <https://github.com/donnemartin/gitsome/pull/98>`__ - Prefer
GitHub Enterprise token before password.
- `#104 <https://github.com/donnemartin/gitsome/pull/104>`__ - Update
install instructions to use pip3.
- `#111 <https://github.com/donnemartin/gitsome/pull/111>`__ - Add note
about current Python 3.6 incompatibility.
- `#115 <https://github.com/donnemartin/gitsome/pull/115>`__ - Set
current Python support to 3.4 and 3.5.
0.6.0 (2016-05-29)
------------------
Features
~~~~~~~~
- `#3 <https://github.com/donnemartin/gitsome/issues/3>`__ - Add GitHub
Enterprise support.
- `#33 <https://github.com/donnemartin/gitsome/issues/33>`__ - Revamp
the info shown with the ``gh feed`` command.
Bug Fixes
~~~~~~~~~
- `#30 <https://github.com/donnemartin/gitsome/issues/30>`__ - Fix a
typo in the ``pip3`` install instructions.
- `#39 <https://github.com/donnemartin/gitsome/issues/39>`__ - Fix
``gh feed`` ``-pr/--private`` flag in docs.
- `#40 <https://github.com/donnemartin/gitsome/issues/40>`__ - Fix
``create-issue`` ``NoneType`` error if no ``-b/--body`` is specified.
- `#46 <https://github.com/donnemartin/gitsome/issues/46>`__ - Fix
``gh view`` with the -b/--browser option only working for repos, not
for issues or PRs.
- `#48 <https://github.com/donnemartin/gitsome/issues/48>`__ - Fix
``create-repo`` ``NoneType`` error if no ``-d/--description`` is
specified.
- `#54 <https://github.com/donnemartin/gitsome/pull/54>`__ - Update to
``prompt-toolkit`` 1.0.0, which includes performance improvements
(especially noticeable on Windows) and bug fixes.
- Fix ``Config`` docstrings.
Updates
~~~~~~~
- `#26 <https://github.com/donnemartin/gitsome/issues/26>`__,
`#32 <https://github.com/donnemartin/gitsome/issues/32>`__ - Add
copyright notices for third party libraries.
- `#44 <https://github.com/donnemartin/gitsome/pull/44>`__,
`#53 <https://github.com/donnemartin/gitsome/pull/53>`__ - Update
packaging dependencies based on semantic versioning.
- Tweak ``README`` intro.
0.5.0 (2016-05-15)
------------------
Features
~~~~~~~~
- `#12 <https://github.com/donnemartin/gitsome/issues/12>`__ - Allow
2FA-enabled users to log in with a password + 2FA code. Previously
2FA-enabled users could only log in with a `personal access
token <https://github.com/settings/tokens>`__. Also includes an
update of login prompts to improve clarity.
Bug Fixes
~~~~~~~~~
- `#16 <https://github.com/donnemartin/gitsome/pull/16>`__,
`#28 <https://github.com/donnemartin/gitsome/pull/28>`__ - Fix typos
in README.
- `#18 <https://github.com/donnemartin/gitsome/pull/18>`__ - Fix dev
install instructions in README.
- `#24 <https://github.com/donnemartin/gitsome/pull/24>`__ - Fix style
guide broken link in CONTRIBUTING.
Updates
~~~~~~~
- `#1 <https://github.com/donnemartin/gitsome/issues/1>`__ - Add
Codecov coverage testing status to README.
- `#2 <https://github.com/donnemartin/gitsome/issues/2>`__ - Add note
about enabling Zsh completions to README.
- `#4 <https://github.com/donnemartin/gitsome/issues/4>`__ - Add note
about using ``pip3`` to README.
- `#5 <https://github.com/donnemartin/gitsome/issues/5>`__ - Decrease
speed of README gif.
- `#6 <https://github.com/donnemartin/gitsome/pull/6>`__ - Update url
for ``click``.
- `#20 <https://github.com/donnemartin/gitsome/issues/20>`__ - Add note
about enabling more completions to README.
- `#21 <https://github.com/donnemartin/gitsome/issues/21>`__ - Bump up
``prompt-toolkit`` version from ``0.51`` to ``0.52``.
- `#26 <https://github.com/donnemartin/gitsome/issues/26>`__ - Add
``xonsh`` copyright notice to LICENSE.
- `#32 <https://github.com/donnemartin/gitsome/pull/32>`__ - Add
``github3.py``, ``html2text``, and ``img2txt`` copyright notices to
LICENSE.
- Update installation instructions in README.
- Update color customization discussion in README.
0.4.0 (2016-05-09)
------------------
- Initial release.
.. |Build Status| image:: https://travis-ci.org/donnemartin/gitsome.svg?branch=master
:target: https://travis-ci.org/donnemartin/gitsome
.. |Codecov| image:: https://img.shields.io/codecov/c/github/donnemartin/gitsome.svg
:target: https://codecov.io/github/donnemartin/gitsome
.. |PyPI version| image:: https://badge.fury.io/py/gitsome.svg
:target: http://badge.fury.io/py/gitsome
.. |PyPI| image:: https://img.shields.io/pypi/pyversions/gitsome.svg
:target: https://pypi.python.org/pypi/gitsome/
.. |License| image:: https://img.shields.io/:license-apache-blue.svg
:target: http://www.apache.org/licenses/LICENSE-2.0.html
================================================
FILE: CHECKLIST.md
================================================
Release Checklist
=================
A. Install in a new venv and run unit tests
Note, you can't seem to script the virtualenv calls, see:
https://bitbucket.org/dhellmann/virtualenvwrapper/issues/219/cant-deactivate-active-virtualenv-from
$ deactivate
$ rmvirtualenv gitsome
$ mkvirtualenv gitsome
$ pip install -e .
$ pip install -r requirements-dev.txt
$ rm -rf .tox && tox
B. Run code checks
$ scripts/run_code_checks.sh
C. Run manual [smoke tests](#smoke-tests) on Mac, Ubuntu, Windows
D. Update and review `README.rst` and `Sphinx` docs, then check gitsome/docs/build/html/index.html
$ scripts/update_docs.sh
E. Push changes
F. Review Travis, Codecov, and Gemnasium
G. Start a new release branch
$ git flow release start x.y.z
H. Increment the version number in `gitsome/__init__.py`
I. Update and review `CHANGELOG`
$ scripts/create_changelog.sh
J. Commit the changes
K. Finish the release branch
$ git flow release finish 'x.y.z'
L. Input a tag
$ vx.y.z
M. Push tagged release to develop and master
$ git checkout master
$ git push
Might need to recreate develop branch.
N. Set CHANGELOG.rst as `README.rst`
$ scripts/set_changelog_as_readme.sh
O. Register package with PyPi
$ python setup.py register -r pypi
P. Upload to PyPi
$ python setup.py sdist upload -r pypi
Q. Upload Sphinx docs to PyPi
$ python setup.py upload_sphinx
R. Review newly released package from PyPi
S. Release on GitHub: https://github.com/donnemartin/gitsome/tags
1. Click "Add release notes" for latest release
2. Copy release notes from `CHANGELOG.md`
3. Click "Publish release"
T. Install in a new venv and run manual [smoke tests](#smoke-tests) on Mac, Ubuntu, Windows
## Smoke Tests
Run the following on Python 3.4:
* Craete a new `virtualenv`
* Pip install `gitsome` into new `virtualenv`
* Run `gitsome`
* Run targeted tests based on recent code changes
================================================
FILE: COMMANDS.md
================================================
# Commands
## GitHub Integration Commands Reference
Check out the handy [autocompleter with interactive help](https://github.com/donnemartin/gitsome/blob/master/README.md#git-and-github-autocompleter-with-interactive-help) to guide you through each command.
### gh configure
Configure `gitsome`.
Attempts to authenticate the user and to set up the user's news feed.
If `gitsome` has not yet been configured, calling a `gh` command that requires authentication will automatically invoke the `configure` command.
Usage/Example(s):
$ gh configure
For GitHub Enterprise users, run with the `-e/--enterprise` flag:
$ gh configure -e
#### Authentication
To properly integrate with GitHub, you will be asked to enter a user name and either a password or a [personal access token](https://github.com/settings/tokens). If you use two-factor authentication, you will also need to enter your 2FA code, or you can log in with a personal access token.
Visit the following page to generate a token:
[https://github.com/settings/tokens](https://github.com/settings/tokens)
`gitsome` will need the 'repo' and 'user' permissions.

#### GitHub Enterprise
GitHub Enterprise users will be asked to enter the GitHub Enterprise url and whether they want to verify SSL certificates.
#### Authentication Source Code
Curious what's going on behind the scenes with authentication? Check out the [authentication source code](https://github.com/donnemartin/gitsome/blob/master/gitsome/config.py#L177-L328).
#### User Feed
`gitsome` will need your news feed url to run the `gh feed` command with no arguments.

To integrate `gitsome` with your news feed, visit the following url while logged into GitHub:
[https://github.com](https://github.com)
You will be asked to enter the url found when clicking 'Subscribe to your news feed', which will look something like this:
https://github.com/donnemartin.private.atom?token=TOKEN

### gh create-comment
Create a comment on the given issue.
Usage:
$ gh create-comment [user_repo_number] [-t/--text]
Param(s):
```
:type user_repo_number: str
:param user_repo_number: The user/repo/issue_number.
```
Option(s):
```
:type text: str
:param text: The comment text.
```
Example(s):
$ gh create-comment donnemartin/saws/1 -t "hello world"
$ gh create-comment donnemartin/saws/1 --text "hello world"
### gh create-issue
Create an issue.
Usage:
$ gh create-issue [user_repo] [-t/--issue_title] [-d/--issue_desc]
Param(s):
```
:type user_repo: str
:param user_repo: The user/repo.
```
Option(s):
```
:type issue_title: str
:param issue_title: The issue title.
:type issue_desc: str
:param issue_desc: The issue body (optional).
```
Example(s):
$ gh create-issue donnemartin/gitsome -t "title"
$ gh create-issue donnemartin/gitsome -t "title" -d "desc"
$ gh create-issue donnemartin/gitsome --issue_title "title" --issue_desc "desc"
### gh create-repo
Create a repo.
Usage:
$ gh create-repo [repo_name] [-d/--repo_desc] [-pr/--private]
Param(s):
```
:type repo_name: str
:param repo_name: The repo name.
```
Option(s):
```
:type repo_desc: str
:param repo_desc: The repo description (optional).
:type private: bool
:param private: Determines whether the repo is private.
Default: False.
```
Example(s):
$ gh create-repo repo_name
$ gh create-repo repo_name -d "desc"
$ gh create-repo repo_name --repo_desc "desc"
$ gh create-repo repo_name -pr
$ gh create-repo repo_name --repo_desc "desc" --private
### gh emails
List all the user's registered emails.
Usage/Example(s):
$ gh emails
### gh emojis
List all GitHub supported emojis.
Usage:
$ gh emojis [-p/--pager]
Option(s):
```
:type pager: bool
:param pager: Determines whether to show the output in a pager,
if available.
```
Example(s):
$ gh emojis
$ gh emojis -p
$ gh emojis --pager
### gh feed
List all activity for the given user or repo.
If `user_or_repo` is not provided, uses the logged in user's news feed seen while visiting https://github.com. If `user_or_repo` is provided, shows either the public or `[-pr/--private]` feed activity of the user or repo.
Usage:
$ gh feed [user_or_repo] [-pr/--private] [-p/--pager]
Param(s):
```
:type user_or_repo: str
:param user_or_repo: The user or repo to list events for (optional).
If no entry, defaults to the logged in user's feed.
```
Option(s):
```
:type private: bool
:param private: Determines whether to show the private events (True)
or public events (False).
:type pager: bool
:param pager: Determines whether to show the output in a pager,
if available.
```
Example(s):
$ gh feed
$ gh feed | grep foo
$ gh feed donnemartin
$ gh feed donnemartin -pr -p
$ gh feed donnemartin --private --pager
$ gh feed donnemartin/haxor-news -p
#### News Feed

#### User Activity Feed

#### Repo Activity Feed

### gh following
List all followed users and the total followed count.
Usage:
$ gh following [user] [-p/--pager]
Param(s):
```
:type user: str
:param user: The user login.
If None, returns the followed users of the logged in user.
```
Option(s):
```
:type pager: bool
:param pager: Determines whether to show the output in a pager,
if available.
```
Example(s):
$ gh following
$ gh following -p
$ gh following octocat --pager

Also check out the [`gh user`](#gh-user) command.
### gh followers
List all followers and the total follower count.
Usage:
$ gh followers [user] [-p/--pager]
Param(s):
```
:type user: str
:param user: The user login (optional).
If None, returns the followers of the logged in user.
```
Option(s):
```
:type pager: bool
:param pager: Determines whether to show the output in a pager,
if available.
```
Example(s):
$ gh followers
$ gh followers -p
$ gh followers octocat --pager
### gh gitignore-template
Output the gitignore template for the given language.
Usage:
$ gh gitignore-template [language]
Param(s):
```
:type language: str
:param language: The language.
```
Example(s):
$ gh gitignore-template Python
$ gh gitignore-template Python > .gitignore

### gh gitignore-templates
Output all supported gitignore templates.
Usage:
$ gh gitignore-templates [-p/--pager]
Option(s):
```
:type pager: bool
:param pager: Determines whether to show the output in a pager,
if available.
```
Example(s):
$ gh gitignore-templates
$ gh gitignore-templates -p
$ gh gitignore-templates --pager

### gh issue
Output detailed information about the given issue.
Usage:
$ gh issue [user_repo_number]
Param(s):
```
:type user_repo_number: str
:param user_repo_number: The user/repo/issue_number.
```
Example(s):
$ gh issue donnemartin/saws/1

### gh issues
List all issues matching the filter.
Usage:
$ gh issues [-f/--issue_filter] [-s/--issue_state] [-l/--limit] [-p/--pager]
Option(s):
```
:type issue_filter: str
:param issue_filter: assigned, created, mentioned, subscribed (default).
:type issue_state: str
:param issue_state: all, open (default), closed.
:type limit: int
:param limit: The number of items to display.
:type pager: bool
:param pager: Determines whether to show the output in a pager,
if available.
```
Example(s):
$ gh issues
$ gh issues -f assigned
$ gh issues --issue_filter created
$ gh issues -s all -l 20 -p
$ gh issues --issue_state closed --limit 20 --pager
$ gh issues -f created -s all -p

### gh license
Output the license template for the given license.
Usage:
$ gh license [license_name]
Param(s):
```
:type license_name: str
:param license_name: The license name.
```
Example(s):
$ gh license apache-2.0
$ gh license mit > LICENSE

### gh licenses
Output all supported license templates.
Usage/Licenses:
$ gh licenses

### gh me
List information about the logged in user.
Displaying the avatar will require [installing the optional `PIL` dependency](#installing-pil).
Usage:
$ gh me [-b/--browser] [-t/--text_avatar] [-l/--limit] [-p/--pager]
Option(s):
```
:type browser: bool
:param browser: Determines whether to view the profile
in a browser, or in the terminal.
:type text_avatar: bool
:param text_avatar: Determines whether to view the profile
avatar in plain text.
On Windows this value is always set to True due to lack of
support of `img2txt` on Windows.
:type limit: int
:param limit: The number of user repos to display.
:type pager: bool
:param pager: Determines whether to show the output in a pager,
if available.
```
Example(s):
$ gh me
$ gh me -b
$ gh me --browser
$ gh me -t -l 20 -p
$ gh me --text_avatar --limit 20 --pager

### gh notifications
List all notifications.
Usage:
$ gh notifications [-l/--limit] [-p/--pager]
Option(s):
```
:type limit: int
:param limit: The number of items to display.
:type pager: bool
:param pager: Determines whether to show the output in a pager,
if available.
```
Example(s):
$ gh notifications
$ gh notifications -l 20 -p
$ gh notifications --limit 20 --pager

### gh octo
Output an Easter egg or the given message from Octocat.
Usage:
$ gh octo [say]
Param(s):
```
:type say: str
:param say: What Octocat should say.
If say is None, octocat speaks an Easter egg.
```
Example(s):
$ gh octo
$ gh octo "foo bar"

### gh pull-request
Output detailed information about the given pull request.
Usage:
$ gh pull-request [user_repo_number]
Param(s):
```
:type user_repo_number: str
:param user_repo_number: The user/repo/pull_number.
```
Example(s):
$ gh pull-request donnemartin/saws/80

### gh pull-requests
List all pull requests.
Usage:
$ gh pull-requests [-l/--limit] [-p/--pager]
Option(s):
```
:type limit: int
:param limit: The number of items to display.
:type pager: bool
:param pager: Determines whether to show the output in a pager,
if available.
```
Example(s):
$ gh pull-requests
$ gh pull-requests -l 20 -p
$ gh pull-requests --limit 20 --pager

### gh rate-limit
Output the rate limit. Not available for GitHub Enterprise.
Usage/Example(s):
$ gh rate-limit
### gh repo
Output detailed information about the given repo.
Usage:
$ gh repo [user_repo]
Param(s):
```
:type user_repo: str
:param user_repo: The user/repo.
```
Example(s):
$ gh repo donnemartin/haxor-news

### gh repos
List all repos matching the given filter.
Usage:
$ gh repos [repo_filter] [-l/--limit] [-p/--pager]
Param(s):
```
:type repo_filter: str
:param repo_filter: The filter for repo names.
Only repos matching the filter will be returned.
If None, outputs all the logged in user's repos.
```
Option(s):
```
:type limit: int
:param limit: The number of items to display.
:type pager: bool
:param pager: Determines whether to show the output in a pager,
if available.
```
Example(s):
$ gh repos
$ gh repos aws
$ gh repos aws -l 20 -p
$ gh repos aws --limit 20 --pager

### gh search-issues
Search for all issues matching the given query.
For more information about the query qualifiers, visit the [searching issues reference](https://help.github.com/articles/searching-issues/).
Usage:
$ gh search-issues [query] [-l/--limit] [-p/--pager]
Param(s):
```
:type query: str
:param query: The search query.
The query can contain any combination of the following supported
qualifers:
- `type` With this qualifier you can restrict the search to issues
or pull request only.
- `in` Qualifies which fields are searched. With this qualifier you
can restrict the search to just the title, body, comments, or any
combination of these.
- `author` Finds issues created by a certain user.
- `assignee` Finds issues that are assigned to a certain user.
- `mentions` Finds issues that mention a certain user.
- `commenter` Finds issues that a certain user commented on.
- `involves` Finds issues that were either created by a certain user,
assigned to that user, mention that user, or were commented on by
that user.
- `state` Filter issues based on whether they’re open or closed.
- `labels` Filters issues based on their labels.
- `language` Searches for issues within repositories that match a
certain language.
- `created` or `updated` Filters issues based on times of creation,
or when they were last updated.
- `comments` Filters issues based on the quantity of comments.
- `user` or `repo` Limits searches to a specific user or
repository.
For more information about these qualifiers, see: http://git.io/d1oELA
```
Option(s):
```
:type limit: int
:param limit: The number of items to display.
:type pager: bool
:param pager: Determines whether to show the output in a pager,
if available.
```
Example(s):
$ gh search-issues "foo type:pr author:donnemartin" -l 20 -p
$ gh search-issues "foobarbaz in:title created:>=2015-01-01" --limit 20 --pager
Additional Example(s):
```
Search issues that have your user name tagged @donnemartin:
$ gh search-issues "is:issue donnemartin is:open" -p
Search issues that have the most +1s:
$ gh search-issues "is:open is:issue sort:reactions-+1-desc" -p
Search issues that have the most comments:
$ gh search-issues "is:open is:issue sort:comments-desc" -p
Search issues with the "help wanted" tag:
$ gh search-issues "is:open is:issue label:\"help wanted\"" -p
Search all your open private issues:
$ gh search-issues "is:open is:issue is:private" -p
```

### gh search-repos
Search for all repos matching the given query.
For more information about the query qualifiers, visit the [searching repos reference](https://help.github.com/articles/searching-repositories/).
Usage:
$ gh search-repos [query] [-s/--sort] [-l/--limit] [-p/--pager]
Param(s):
```
:type query: str
:param query: The search query.
The query can contain any combination of the following supported
qualifers:
- `in` Qualifies which fields are searched. With this qualifier you
can restrict the search to just the repository name, description,
readme, or any combination of these.
- `size` Finds repositories that match a certain size (in
kilobytes).
- `forks` Filters repositories based on the number of forks, and/or
whether forked repositories should be included in the results at
all.
- `created` or `pushed` Filters repositories based on times of
creation, or when they were last updated. Format: `YYYY-MM-DD`.
Examples: `created:<2011`, `pushed:<2013-02`,
`pushed:>=2013-03-06`
- `user` or `repo` Limits searches to a specific user or
repository.
- `language` Searches repositories based on the language they're
written in.
- `stars` Searches repositories based on the number of stars.
For more information about these qualifiers, see: http://git.io/4Z8AkA
```
Option(s):
```
:type sort: str
:param sort: Optional: 'stars', 'forks', 'updated'.
If not specified, sorting is done by query best match.
:type limit: int
:param limit: The number of items to display.
:type pager: bool
:param pager: Determines whether to show the output in a pager,
if available.
```
Example(s):
$ gh search-repos "maps language:python" -s stars -l 20 -p
$ gh search-repos "created:>=2015-01-01 stars:>=1000 language:python" --sort stars --limit 20 --pager

### gh starred
Output starred repos.
Usage:
$ gh starred [repo_filter] [-l/--limit] [-p/--pager]
Param(s):
```
:type repo_filter: str
:param repo_filter: The filter for repo names.
Only repos matching the filter will be returned.
If None, outputs all starred repos.
```
Option(s):
```
:type limit: int
:param limit: The number of items to display.
:type pager: bool
:param pager: Determines whether to show the output in a pager,
if available.
```
Example(s):
$ gh starred
$ gh starred foo -l 20 -p
$ gh starred foo --limit 20 --pager

### gh trending
List trending repos for the given language.
Usage:
$ gh trending [language] [-w/--weekly] [-m/--monthly] [-D/--devs] [-b/--browser] [-p/--pager]
Param(s):
```
:type language: str
:param language: The language (optional).
If blank, shows 'Overall'.
```
Option(s):
```
:type weekly: bool
:param weekly: Determines whether to show the weekly rankings.
Daily is the default.
:type monthly: bool
:param monthly: Determines whether to show the monthly rankings.
Daily is the default.
If both `monthly` and `weekly` are set, `monthly` takes precedence.
:type devs: bool
:param devs: determines whether to display the trending
devs or repos. Only valid with the -b/--browser option.
:type browser: bool
:param browser: Determines whether to view the profile
in a browser, or in the terminal.
:type pager: bool
:param pager: Determines whether to show the output in a pager,
if available.
```
Example(s):
$ gh trending
$ gh trending Python -w -p
$ gh trending Python --weekly --devs --browser
$ gh trending --browser

### gh user
List information about the given user.
Displaying the avatar will require [installing the optional `PIL` dependency](#installing-pil).
Usage:
$ gh user [user_id] [-b/--browser] [-t/--text_avatar] [-l/--limit] [-p/--pager]
Param(s):
```
:type user_id: str
:param user_id: The user id/login.
If None, returns followers of the logged in user.
```
Option(s):
```
:type browser: bool
:param browser: Determines whether to view the profile
in a browser, or in the terminal.
:type text_avatar: bool
:param text_avatar: Determines whether to view the profile
avatar in plain text instead of ansi (default).
On Windows this value is always set to True due to lack of
support of `img2txt` on Windows.
:type limit: int
:param limit: The number of items to display.
:type pager: bool
:param pager: Determines whether to show the output in a pager,
if available.
```
Example(s):
$ gh user octocat
$ gh user octocat -b
$ gh user octocat --browser
$ gh user octocat -t -l 10 -p
$ gh user octocat --text_avatar --limit 10 --pager

### gh view
View the given notification/repo/issue/pull_request/user index in the terminal or a browser.
This method is meant to be called after one of the following commands
which outputs a table of notifications/repos/issues/pull_requests/users:
$ gh repos
$ gh search-repos
$ gh starred
$ gh issues
$ gh pull-requests
$ gh search-issues
$ gh notifications
$ gh trending
$ gh user
$ gh me
Usage:
$ gh view [index] [-b/--browser]
Param(s):
```
:type index: str
:param index: Determines the index to view.
```
Option(s):
```
:type browser: bool
:param browser: Determines whether to view the profile
in a browser, or in the terminal.
```
Example(s):
$ gh repos
$ gh view 1
$ gh starred
$ gh view 1 -b
$ gh view 1 --browser

### Option: View in a Pager
Many `gh` commands support a `-p/--pager` option that displays results in a pager, where available.
Usage:
$ gh <command> [param] [options] -p
$ gh <command> [param] [options] --pager
### Option: View in a Browser
Many `gh` commands support a `-b/--browser` option that displays results in your default browser instead of your terminal.
Usage:
$ gh <command> [param] [options] -b
$ gh <command> [param] [options] --browser
================================================
FILE: CONTRIBUTING.md
================================================
Contributing
============
Contributions are welcome!
**Please carefully read this page to make the code review process go as smoothly as possible and to maximize the likelihood of your contribution being merged.**
## Bug Reports
For bug reports or requests [submit an issue](https://github.com/donnemartin/gitsome/issues).
## Pull Requests
The preferred way to contribute is to fork the
[main repository](https://github.com/donnemartin/gitsome) on GitHub.
1. Fork the [main repository](https://github.com/donnemartin/gitsome). Click on the 'Fork' button near the top of the page. This creates a copy of the code under your account on the GitHub server.
2. Clone this copy to your local disk:
$ git clone git@github.com:YourLogin/gitsome.git
$ cd gitsome
3. Create a branch to hold your changes and start making changes. Don't work in the `master` branch!
$ git checkout -b my-feature
4. Work on this copy on your computer using Git to do the version control. When you're done editing, run the following to record your changes in Git:
$ git add modified_files
$ git commit
5. Push your changes to GitHub with:
$ git push -u origin my-feature
6. Finally, go to the web page of your fork of the `gitsome` repo and click 'Pull Request' to send your changes for review.
### GitHub Pull Requests Docs
If you are not familiar with pull requests, review the [pull request docs](https://help.github.com/articles/using-pull-requests/).
### Code Quality
Ensure your pull request satisfies all of the following, where applicable:
* Is covered by [unit tests](https://github.com/donnemartin/gitsome#unit-tests-and-code-coverage)
* Passes [continuous integration](https://github.com/donnemartin/gitsome#continuous-integration)
* Is covered by [documentation](https://github.com/donnemartin/gitsome#documentation)
Review the following [style guide](https://google.github.io/styleguide/pyguide.html).
Run code checks and fix any issues:
$ scripts/run_code_checks.sh
### Installation
Refer to the [Installation](https://github.com/donnemartin/gitsome#installation) and [Developer Installation](https://github.com/donnemartin/gitsome#developer-installation) sections.
================================================
FILE: Dockerfile
================================================
##########################################################
# #
# Build the image: #
# docker build -t gitsome . #
# #
# Run the container: #
# docker run -ti --rm -v $(pwd):/src/ \ #
# -v ${HOME}/.gitsomeconfig:/root/.gitsomeconfig \ #
# -v ${HOME}/.gitconfig:/root/.gitconfig \ #
# gitsome #
# #
##########################################################
FROM python:3.5
RUN pip install Pillow
COPY /requirements-dev.txt /gitsome/
WORKDIR /gitsome/
RUN pip install -r requirements-dev.txt
COPY / /gitsome/
RUN pip install -e .
RUN mkdir /src/
WORKDIR /src/
ENTRYPOINT ["gitsome"]
================================================
FILE: LICENSE.txt
================================================
gitsome is licensed under Apache 2.0:
I am providing code and resources in this repository to you under an open source
license. Because this is my personal repository, the license you receive to my
code and resources is from me and not my employer (Facebook).
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2016 Donne Martin. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
xonsh is licensed under BSD:
Copyright 2015, the xonsh developers. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are
permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of
conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list
of conditions and the following disclaimer in the documentation and/or other materials
provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE XONSH DEVELOPERS ``AS IS'' AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE XONSH DEVELOPERS OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
The views and conclusions contained in the software and documentation are those of the
authors and should not be interpreted as representing official policies, either expressed
or implied, of the stakeholders of the xonsh project or the employers of xonsh developers.
github3.py is licensed under BSD:
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The name of the author may not be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
img2txt is licensed under BSD:
Copyright (c) 2013 - 2015, hit9
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of img2txt nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
html2text is licensed under GNU:
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
================================================
FILE: PRIVACY.md
================================================
# Privacy Policy
## What information do we collect?
To properly integrate with GitHub, `gitsome` must authenticate with GitHub and/or GitHub Enterprise.
When using `gitsome`, you may be asked to enter your: user name, password, two factor authentication token, user access token, news feed url, or GitHub Enterprise url. See the [configure](https://github.com/donnemartin/gitsome/blob/master/COMMANDS.md#gh-configure) section for more details.
You may, however, use features of `gitsome` that do not require GitHub authentication anonymously.
## What do we use your information for?
Any of the information we collect from you is used solely to interact with GitHub and/or GitHub Enterprise. Other than to provide integration with GitHub, we do not disclose or transfer your information to outside parties.
## How do we protect your information?
All supplied sensitive information is encrypted during transmission to GitHub via Secure Socket Layer (SSL) technology.
## Terms and Conditions
Please also visit our Terms and Conditions section establishing the use, disclaimers, and limitations of liability governing the use of `gitsome`.
## Your Consent
By using `gitsome`, you consent to our privacy policy.
## Changes to our Privacy Policy
If we decide to change our privacy policy, we will post those changes on this page.
## Contacting Us
Any questions about this document should be addressed to [Donne Martin](donne.martin@gmail.com).
================================================
FILE: README.md
================================================
<p align="center">
<img src="http://i.imgur.com/0SXZ90y.gif">
</p>
<p align="center">
An <a href="https://github.com/works-with/category/desktop-tools">Official Integration</a> for GitHub and <a href="#for-github-enterprise-users">GitHub Enterprise</a>.
</p>
gitsome
=======
[](https://travis-ci.org/donnemartin/gitsome) [](http://badge.fury.io/py/gitsome) [](https://pypi.python.org/pypi/gitsome/) [](http://www.apache.org/licenses/LICENSE-2.0.html)
## Why `gitsome`?
### The Git Command Line
Although the standard Git command line is a great tool to manage your Git-powered repos, it can be **tough to remember the usage** of:
* 150+ porcelain and plumbing commands
* Countless command-specific options
* Resources such as tags and branches
The Git command line **does not integrate with GitHub**, forcing you to toggle between command line and browser.
## `gitsome` - A Supercharged Git/GitHub CLI With Autocomplete
<p align="center">
<img src="https://raw.githubusercontent.com/donnemartin/gitsome/develop/images/logo.png">
</p>
`gitsome` aims to supercharge your standard git/shell interface by focusing on:
* **Improving ease-of-use**
* **Increasing productivity**
### Deep GitHub Integration
Not all GitHub workflows work well in a terminal; `gitsome` attempts to target those that do.
`gitsome` includes 29 GitHub integrated commands that work with **[ALL](#enabling-gh-tab-completions-outside-of-gitsome)** shells:
$ gh <command> [param] [options]
* [Quick reference](#github-integration-commands-quick-reference)
* [General reference](https://github.com/donnemartin/gitsome/blob/master/COMMANDS.md)
Run `gh` commands along with [Git-Extras](https://github.com/tj/git-extras/blob/master/Commands.md) and [hub](https://hub.github.com/) commands to unlock even more GitHub integrations!

### Git and GitHub Autocompleter With Interactive Help
You can run the <u>**optional**</u> shell:
$ gitsome
to enable **autocompletion** and **interactive help** for the following:
* Git commands
* Git options
* Git branches, tags, etc
* [Git-Extras commands](https://github.com/tj/git-extras/blob/master/Commands.md)
* [GitHub integration commands](https://github.com/donnemartin/gitsome/blob/master/COMMANDS.md)


### General Autocompleter
`gitsome` autocompletes the following:
* Shell commands
* Files and directories
* Environment variables
* Man pages
* Python
To enable additional autocompletions, check out the [Enabling Bash Completions](#enabling-bash-completions) section.

## Fish-Style Auto-Suggestions
`gitsome` supports Fish-style auto-suggestions. Use the `right arrow` key to complete a suggestion.

## Python REPL
`gitsome` is powered by [`xonsh`](https://github.com/scopatz/xonsh), which supports a Python REPL.
Run Python commands alongside shell commands:

Additional `xonsh` features can be found in the [`xonsh tutorial`](http://xon.sh/tutorial.html).
## Command History
`gitsome` keeps track of commands you enter and stores them in `~/.xonsh_history.json`. Use the up and down arrow keys to cycle through the command history.

## Customizable Highlighting
You can control the ansi colors used for highlighting by updating your `~/.gitsomeconfig` file.
Color options include:
```
'black', 'red', 'green', 'yellow',
'blue', 'magenta', 'cyan', 'white'
```
For no color, set the value(s) to `None`. `white` can appear as light gray on some terminals.

## Available Platforms
`gitsome` is available for Mac, Linux, Unix, [Windows](#windows-support), and [Docker](#running-as-docker-container).
## TODO
>Not all GitHub workflows work well in a terminal; `gitsome` attempts to target those that do.
* Add additional GitHub API integrations
`gitsome` is just getting started. Feel free to [contribute!](#contributing)
## Index
### GitHub Integration Commands
* [GitHub Integration Commands Syntax](#github-integration-commands-syntax)
* [GitHub Integration Commands Listing](#github-integration-commands-listing)
* [GitHub Integration Commands Quick Reference](#github-integration-commands-quick-reference)
* [GitHub Integration Commands Reference in COMMANDS.md](https://github.com/donnemartin/gitsome/blob/master/COMMANDS.md)
* [`gh configure`](https://github.com/donnemartin/gitsome/blob/master/COMMANDS.md#gh-configure)
* [`gh create-comment`](https://github.com/donnemartin/gitsome/blob/master/COMMANDS.md#gh-create-comment)
* [`gh create-issue`](https://github.com/donnemartin/gitsome/blob/master/COMMANDS.md#gh-create-issue)
* [`gh create-repo`](https://github.com/donnemartin/gitsome/blob/master/COMMANDS.md#gh-create-repo)
* [`gh emails`](https://github.com/donnemartin/gitsome/blob/master/COMMANDS.md#gh-emails)
* [`gh emojis`](https://github.com/donnemartin/gitsome/blob/master/COMMANDS.md#gh-emojis)
* [`gh feed`](https://github.com/donnemartin/gitsome/blob/master/COMMANDS.md#gh-feed)
* [`gh followers`](https://github.com/donnemartin/gitsome/blob/master/COMMANDS.md#gh-followers)
* [`gh following`](https://github.com/donnemartin/gitsome/blob/master/COMMANDS.md#gh-following)
* [`gh gitignore-template`](https://github.com/donnemartin/gitsome/blob/master/COMMANDS.md#gh-gitignore-template)
* [`gh gitignore-templates`](https://github.com/donnemartin/gitsome/blob/master/COMMANDS.md#gh-gitignore-templates)
* [`gh issue`](https://github.com/donnemartin/gitsome/blob/master/COMMANDS.md#gh-issue)
* [`gh issues`](https://github.com/donnemartin/gitsome/blob/master/COMMANDS.md#gh-issues)
* [`gh license`](https://github.com/donnemartin/gitsome/blob/master/COMMANDS.md#gh-license)
* [`gh licenses`](https://github.com/donnemartin/gitsome/blob/master/COMMANDS.md#gh-licenses)
* [`gh me`](https://github.com/donnemartin/gitsome/blob/master/COMMANDS.md#gh-me)
* [`gh notifications`](https://github.com/donnemartin/gitsome/blob/master/COMMANDS.md#gh-notifications)
* [`gh octo`](https://github.com/donnemartin/gitsome/blob/master/COMMANDS.md#gh-octo)
* [`gh pull-request`](https://github.com/donnemartin/gitsome/blob/master/COMMANDS.md#gh-pull-request)
* [`gh pull-requests`](https://github.com/donnemartin/gitsome/blob/master/COMMANDS.md#gh-pull-requests)
* [`gh rate-limit`](https://github.com/donnemartin/gitsome/blob/master/COMMANDS.md#gh-rate-limit)
* [`gh repo`](https://github.com/donnemartin/gitsome/blob/master/COMMANDS.md#gh-repo)
* [`gh repos`](https://github.com/donnemartin/gitsome/blob/master/COMMANDS.md#gh-repos)
* [`gh search-issues`](https://github.com/donnemartin/gitsome/blob/master/COMMANDS.md#gh-search-issues)
* [`gh search-repos`](https://github.com/donnemartin/gitsome/blob/master/COMMANDS.md#gh-search-repos)
* [`gh starred`](https://github.com/donnemartin/gitsome/blob/master/COMMANDS.md#gh-starred)
* [`gh trending`](https://github.com/donnemartin/gitsome/blob/master/COMMANDS.md#gh-trending)
* [`gh user`](https://github.com/donnemartin/gitsome/blob/master/COMMANDS.md#gh-user)
* [`gh view`](https://github.com/donnemartin/gitsome/blob/master/COMMANDS.md#gh-view)
* [Option: View in a Pager](https://github.com/donnemartin/gitsome/blob/master/COMMANDS.md#option-view-in-a-pager)
* [Option: View in a Browser](https://github.com/donnemartin/gitsome/blob/master/COMMANDS.md#option-view-in-a-browser)
### Installation and Tests
* [Installation](#installation)
* [Pip Installation](#pip-installation)
* [Virtual Environment Installation](#virtual-environment-installation)
* [Running as a Docker Container](#running-as-a-docker-container)
* [Running the `gh configure` Command](#running-the-gh-configure-command)
* [For GitHub Enterprise Users](#for-github-enterprise-users)
* [Enabling Bash Completions](#enabling-bash-completions)
* [Enabling `gh` Tab Completions Outside of `gitsome`](#enabling-gh-tab-completions-outside-of-gitsome)
* [For Zsh Users](#for-zsh-users)
* [Optional: Installing `PIL` or `Pillow`](#optional-installing-pil-or-pillow)
* [Supported Python Versions](#supported-python-versions)
* [Supported Platforms](#supported-platforms)
* [Windows Support](#windows-support)
* [Developer Installation](#developer-installation)
* [Continuous Integration](#continuous-integration)
* [Unit Tests and Code Coverage](#unit-tests-and-code-coverage)
* [Documentation](#documentation)
### Misc
* [Contributing](#contributing)
* [Credits](#credits)
* [Contact Info](#contact-info)
* [License](#license)
## GitHub Integration Commands Syntax
Usage:
$ gh <command> [param] [options]
## GitHub Integration Commands Listing
```
configure Configure gitsome.
create-comment Create a comment on the given issue.
create-issue Create an issue.
create-repo Create a repo.
emails List all the user's registered emails.
emojis List all GitHub supported emojis.
feed List all activity for the given user or repo.
followers List all followers and the total follower count.
following List all followed users and the total followed count.
gitignore-template Output the gitignore template for the given language.
gitignore-templates Output all supported gitignore templates.
issue Output detailed information about the given issue.
issues List all issues matching the filter.
license Output the license template for the given license.
licenses Output all supported license templates.
me List information about the logged in user.
notifications List all notifications.
octo Output an Easter egg or the given message from Octocat.
pull-request Output detailed information about the given pull request.
pull-requests List all pull requests.
rate-limit Output the rate limit. Not available for Enterprise.
repo Output detailed information about the given filter.
repos List all repos matching the given filter.
search-issues Search for all issues matching the given query.
search-repos Search for all repos matching the given query.
starred Output starred repos.
trending List trending repos for the given language.
user List information about the given user.
view View the given index in the terminal or a browser.
```
## GitHub Integration Commands Reference: COMMANDS.md
See the [GitHub Integration Commands Reference in COMMANDS.md](https://github.com/donnemartin/gitsome/blob/master/COMMANDS.md) for a **detailed discussion** of all GitHub integration commands, parameters, options, and examples.
Check out the next section for a **quick reference**.
## GitHub Integration Commands Quick Reference
### Configuring `gitsome`
To properly integrate with GitHub, you must first configure `gitsome`:
$ gh configure
For GitHub Enterprise users, run with the `-e/--enterprise` flag:
$ gh configure -e
### Listing Feeds
#### Listing Your News Feed
$ gh feed

#### Listing A User's Activity Feed
View your activity feed or another user's activity feed, optionally through a pager with `-p/--pager`. The [pager option](#option-view-in-a-pager) is available for many commands.
$ gh feed donnemartin -p

#### Listing A Repo's Activity Feed
$ gh feed donnemartin/gitsome -p

### Listing Notifications
$ gh notifications

### Listing Pull Requests
View all pull requests for your repos:
$ gh pull-requests

### Filtering Issues
View all open issues where you have been mentioned:
$ gh issues --issue_state open --issue_filter mentioned

View all issues, filtering for only those assigned to you, regardless of state (open, closed):
$ gh issues --issue_state all --issue_filter assigned
For more information about the filter and state qualifiers, visit the [`gh issues`](https://github.com/donnemartin/gitsome/blob/master/COMMANDS.md#gh-issues) reference in [COMMANDS.md](https://github.com/donnemartin/gitsome/blob/master/COMMANDS.md).
### Filtering Starred Repos
$ gh starred "repo filter"

### Searching Issues and Repos
#### Searching Issues
Search issues that have the most +1s:
$ gh search-issues "is:open is:issue sort:reactions-+1-desc" -p

Search issues that have the most comments:
$ gh search-issues "is:open is:issue sort:comments-desc" -p
Search issues with the "help wanted" tag:
$ gh search-issues "is:open is:issue label:\"help wanted\"" -p
Search issues that have your user name tagged **@donnemartin**:
$ gh search-issues "is:issue donnemartin is:open" -p
Search all your open private issues:
$ gh search-issues "is:open is:issue is:private" -p
For more information about the query qualifiers, visit the [searching issues reference](https://help.github.com/articles/searching-issues/).
#### Searching Repos
Search all Python repos created on or after 2015, with >= 1000 stars:
$ gh search-repos "created:>=2015-01-01 stars:>=1000 language:python" --sort stars -p

For more information about the query qualifiers, visit the [searching repos reference](https://help.github.com/articles/searching-repositories/).
### Listing Trending Repos and Devs
View trending repos:
$ gh trending [language] [-w/--weekly] [-m/--monthly] [-d/--devs] [-b/--browser]

View trending devs (devs are currently only supported in browser):
$ gh trending [language] --devs --browser
### Viewing Content
#### The `view` command
View the previously listed notifications, pull requests, issues, repos, users etc, with HTML nicely formatted for your terminal, or optionally in your browser:
$ gh view [#] [-b/--browser]

#### The `issue` command
View an issue:
$ gh issue donnemartin/saws/1

#### The `pull-request` command
View a pull request:
$ gh pull-request donnemartin/awesome-aws/2

### Setting Up `.gitignore`
List all available `.gitignore` templates:
$ gh gitignore-templates

Set up your `.gitignore`:
$ gh gitignore-template Python > .gitignore

### Setting Up `LICENSE`
List all available `LICENSE` templates:
$ gh licenses

Set up your or `LICENSE`:
$ gh license MIT > LICENSE

### Summoning Octocat
Call on Octocat to say the given message or an Easter egg:
$ gh octo [say]

### Viewing Profiles
#### Viewing A User's Profile
$ gh user octocat

#### Viewing Your Profile
View your profile with the `gh user [YOUR_USER_ID]` command or with the following shortcut:
$ gh me

### Creating Comments, Issues, and Repos
Create a comment:
$ gh create-comment donnemartin/gitsome/1 -t "hello world"
Create an issue:
$ gh create-issue donnemartin/gitsome -t "title" -b "body"
Create a repo:
$ gh create-repo gitsome
### Option: View in a Pager
Many `gh` commands support a `-p/--pager` option that displays results in a pager, where available.
Usage:
$ gh <command> [param] [options] -p
$ gh <command> [param] [options] --pager
### Option: View in a Browser
Many `gh` commands support a `-b/--browser` option that displays results in your default browser instead of your terminal.
Usage:
$ gh <command> [param] [options] -b
$ gh <command> [param] [options] --browser
See the [COMMANDS.md](https://github.com/donnemartin/gitsome/blob/master/COMMANDS.md) for a detailed listing of all GitHub integration commands, parameters, options, and examples.
Having trouble remembering these commands? Check out the handy [autocompleter with interactive help](#git-and-github-autocompleter-with-interactive-help) to guide you through each command.
*Note, you can combine `gitsome` with other utilities such as [Git-Extras](https://github.com/tj/git-extras/blob/master/Commands.md).*
## Installation
### Pip Installation
[](http://badge.fury.io/py/gitsome) [](https://pypi.python.org/pypi/gitsome/)
`gitsome` is hosted on [PyPI](https://pypi.python.org/pypi/gitsome). The following command will install `gitsome`:
$ pip3 install gitsome
You can also install the latest `gitsome` from GitHub source which can contain changes not yet pushed to PyPI:
$ pip3 install git+https://github.com/donnemartin/gitsome.git
If you are not installing in a `virtualenv`, you might need to run with `sudo`:
$ sudo pip3 install gitsome
#### `pip3`
Depending on your setup, you might also want to run `pip3` with the [`-H flag`](http://stackoverflow.com/a/28619739):
$ sudo -H pip3 install gitsome
For most linux users, `pip3` can be installed on your system using the `python3-pip` package.
For example, Ubuntu users can run:
$ sudo apt-get install python3-pip
See this [ticket](https://github.com/donnemartin/gitsome/issues/4) for more details.
### Virtual Environment Installation
You can install Python packages in a [`virtualenv`](http://docs.python-guide.org/en/latest/dev/virtualenvs/) to avoid potential issues with dependencies or permissions.
If you are a Windows user or if you would like more details on `virtualenv`, check out this [guide](http://docs.python-guide.org/en/latest/dev/virtualenvs/).
Install `virtualenv` and `virtualenvwrapper`:
$ pip3 install virtualenv
$ pip3 install virtualenvwrapper
$ export WORKON_HOME=~/.virtualenvs
$ source /usr/local/bin/virtualenvwrapper.sh
Create a `gitsome` `virtualenv` and install `gitsome`:
$ mkvirtualenv gitsome
$ pip3 install gitsome
If the `pip` install does not work, you might be running Python 2 by default. Check what version of Python you are running:
$ python --version
If the call above results in Python 2, find the path for Python 3:
$ which python3 # Python 3 path for mkvirtualenv's --python option
Install Python 3 if needed. Set the Python version when calling `mkvirtualenv`:
$ mkvirtualenv --python [Python 3 path from above] gitsome
$ pip3 install gitsome
If you want to activate the `gitsome` `virtualenv` again later, run:
$ workon gitsome
To deactivate the `gitsome` `virtualenv`, run:
$ deactivate
### Running as a Docker Container
You can run gitsome in a Docker container to avoid installing Python and `pip3` locally. To install Docker check out the [official Docker documentation](https://docs.docker.com/engine/getstarted/step_one/#step-1-get-docker).
Once you have docker installed you can run gitsome:
$ docker run -ti --rm mariolet/gitsome
You can use Docker volumes to let gitsome access your working directory, your local .gitsomeconfig and .gitconfig:
$ docker run -ti --rm -v $(pwd):/src/ \
-v ${HOME}/.gitsomeconfig:/root/.gitsomeconfig \
-v ${HOME}/.gitconfig:/root/.gitconfig \
mariolet/gitsome
If you are running this command often you will probably want to define an alias:
$ alias gitsome="docker run -ti --rm -v $(pwd):/src/ \
-v ${HOME}/.gitsomeconfig:/root/.gitsomeconfig \
-v ${HOME}/.gitconfig:/root/.gitconfig \
mariolet/gitsome"
To build the Docker image from sources:
$ git clone https://github.com/donnemartin/gitsome.git
$ cd gitsome
$ docker build -t gitsome .
### Starting the `gitsome` Shell
Once installed, run the optional `gitsome` autocompleter with interactive help:
$ gitsome
Running the optional `gitsome` shell will provide you with autocompletion, interactive help, fish-style suggestions, a Python REPL, etc.
### Running `gh` Commands
Run GitHub-integrated commands:
$ gh <command> [param] [options]
Note: Running the `gitsome` shell is not required to execute `gh` commands. After [installing](#installation) `gitsome` you can run `gh` commands from any shell.
### Running the `gh configure` Command
To properly integrate with GitHub, `gitsome` must be properly configured:
$ gh configure
#### For GitHub Enterprise Users
Run with the `-e/--enterprise` flag:
$ gh configure -e
View more details in the [gh configure](https://github.com/donnemartin/gitsome/blob/master/COMMANDS.md#gh-configure) section.
### Enabling Bash Completions
By default, `gitsome` looks at the following [locations to enable bash completions](https://github.com/donnemartin/gitsome/blob/master/xonsh/environ.py#L123-L131).
To add additional bash completions, update the `~/.xonshrc` file with the location of your bash completions.
If `~/.xonshrc` does not exist, create it:
$ touch ~/.xonshrc
For example, if additional completions are found in `/usr/local/etc/my_bash_completion.d/completion.bash`, add the following line in `~/.xonshrc`:
```
$BASH_COMPLETIONS.append('/usr/local/etc/my_bash_completion.d/completion.bash')
```
You will need to restart `gitsome` for the changes to take effect.
### Enabling `gh` Tab Completions Outside of `gitsome`
You can run `gh` commands outside of the `gitsome` shell completer. To enable `gh` tab completions for this workflow, copy the [`gh_complete.sh`](https://github.com/donnemartin/gitsome/blob/master/scripts/gh_complete.sh) file locally.
Let bash know completion is available for the `gh` command within your current session:
$ source /path/to/gh_complete.sh
To enable tab completion for all terminal sessions, add the following to your `bashrc` file:
source /path/to/gh_complete.sh
Reload your `bashrc`:
$ source ~/.bashrc
Tip: `.` is the short form of `source`, so you can run this instead:
$ . ~/.bashrc
#### For Zsh Users
`zsh` includes a module which is compatible with bash completions.
Download the [`gh_complete.sh`](https://github.com/donnemartin/gitsome/blob/master/scripts/gh_complete.sh) file as above and append the following to your `.zshrc`:
autoload bashcompinit
bashcompinit
source /path/to/gh_complete.sh
Reload your `zshrc`:
$ source ~/.zshrc
### Optional: Installing `PIL` or `Pillow`
Displaying the avatar for the `gh me` and `gh user` commands will require installing the optional `PIL` or `Pillow` dependency.
Windows* and Mac:
$ pip3 install Pillow
*See the [Windows Support](#windows-support) section for limitations on the avatar.
Ubuntu users, check out these [instructions on askubuntu](http://askubuntu.com/a/272095)
### Supported Python Versions
* Python 3.4
* Python 3.5
* Python 3.6
* Python 3.7
`gitsome` is powered by `xonsh` which does not currently support Python 2.x, as discussed in this [ticket](https://github.com/scopatz/xonsh/issues/66).
### Supported Platforms
* Mac OS X
* Tested on OS X 10.10
* Linux, Unix
* Tested on Ubuntu 14.04 LTS
* Windows
* Tested on Windows 10
### Windows Support
`gitsome` has been tested on Windows 10 with `cmd` and `cmder`.
Although you can use the standard Windows command prompt, you'll probably have a better experience with either [cmder](https://github.com/cmderdev/cmder) or [conemu](https://github.com/Maximus5/ConEmu).

#### Text Only Avatar
The commands [`gh user`](https://github.com/donnemartin/gitsome/blob/master/COMMANDS.md#gh-user) and [`gh me`](https://github.com/donnemartin/gitsome/blob/master/COMMANDS.md#gh-me) will always have the `-t/--text_avatar` flag enabled, since [`img2txt`](#credits) does not support the ansi avatar on Windows.
#### Config File
On Windows, the `.gitsomeconfig ` file can be found in `%userprofile%`. For example:
C:\Users\dmartin\.gitsomeconfig
## Developer Installation
If you're interested in contributing to `gitsome`, run the following commands:
$ git clone https://github.com/donnemartin/gitsome.git
$ cd gitsome
$ pip3 install -e .
$ pip3 install -r requirements-dev.txt
$ gitsome
$ gh <command> [param] [options]
#### `pip3`
If you get an error while installing saying that you need Python 3.4+, it could be because your `pip` command is configured for an older version of Python. To fix this issue, it is recommended to install `pip3`:
$ sudo apt-get install python3-pip
See this [ticket](https://github.com/donnemartin/gitsome/issues/4) for more details.
### Continuous Integration
[](https://travis-ci.org/donnemartin/gitsome)
Continuous integration details are available on [Travis CI](https://travis-ci.org/donnemartin/gitsome).
### Unit Tests and Code Coverage
Run unit tests in your active Python environment:
$ python tests/run_tests.py
Run unit tests with [tox](https://pypi.python.org/pypi/tox) on multiple Python environments:
$ tox
### Documentation
Source code documentation will soon be available on [Readthedocs.org](https://readthedocs.org/). Check out the [source docstrings](https://github.com/donnemartin/gitsome/blob/master/gitsome/githubcli.py).
Run the following to build the docs:
$ scripts/update_docs.sh
## Contributing
Contributions are welcome!
Review the [Contributing Guidelines](https://github.com/donnemartin/gitsome/blob/master/CONTRIBUTING.md) for details on how to:
* Submit issues
* Submit pull requests
## Credits
* [click](https://github.com/pallets/click) by [mitsuhiko](https://github.com/mitsuhiko)
* [github_trends_rss](https://github.com/ryotarai/github_trends_rss) by [ryotarai](https://github.com/ryotarai)
* [github3.py](https://github.com/sigmavirus24/github3.py) by [sigmavirus24](https://github.com/sigmavirus24)
* [html2text](https://github.com/aaronsw/html2text) by [aaronsw](https://github.com/aaronsw)
* [img2txt](https://github.com/hit9/img2txt) by [hit9](https://github.com/hit9)
* [python-prompt-toolkit](https://github.com/jonathanslenders/python-prompt-toolkit) by [jonathanslenders](https://github.com/jonathanslenders)
* [requests](https://github.com/kennethreitz/requests) by [kennethreitz](https://github.com/kennethreitz)
* [xonsh](https://github.com/scopatz/xonsh) by [scopatz](https://github.com/scopatz)
## Contact Info
Feel free to contact me to discuss any issues, questions, or comments.
My contact info can be found on my [GitHub page](https://github.com/donnemartin).
## License
*I am providing code and resources in this repository to you under an open source license. Because this is my personal repository, the license you receive to my code and resources is from me and not my employer (Facebook).*
[](http://www.apache.org/licenses/LICENSE-2.0.html)
Copyright 2016 Donne Martin
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
================================================
FILE: TOS.md
================================================
# Terms of Service
By using `gitsome`, you are agreeing to be bound by the following terms and conditions ("Terms of Service"). If you are entering into this agreement on behalf of a company or other legal entity, you represent that you have the authority to bind such entity, its affiliates and all users who access `gitsome` through your account to these terms and conditions, in which case the terms "you" or "your" shall refer to such entity, its affiliates and users associated with it. If you do not have such authority, or if you do not agree with these terms and conditions, you must not accept this agreement and may not use `gitsome`.
`gitsome` is maintained by [Donne Martin](donne.martin@gmail.com).
Donne Martin reserves the right to update and change the Terms of Service from time to time without notice. Any new features that augment or enhance `gitsome`, including the release of new tools and resources, shall be subject to the Terms of Service. Continued use of `gitsome` after any such changes shall constitute your consent to such changes.
## Account Terms
* You are responsible for maintaining the security of your GitHub account.
* You are responsible for all activity that occurs by using `gitsome`.
* You may not use the `gitsome` for any illegal or unauthorized purpose.
* You must not, in the use of `gitsome`, violate any laws in your jurisdiction.
* Your use of `gitsome` is at your sole risk.
## Copyright
`gitsome` is copyright ©2016 Donne Martin.
## Questions
Any questions about this document should be addressed to [Donne Martin](donne.martin@gmail.com).
================================================
FILE: appveyor.yml
================================================
# What Python version is installed where:
# http://www.appveyor.com/docs/installed-software#python
environment:
matrix:
- PYTHON: "C:\\Python27"
TOX_ENV: "py27"
- PYTHON: "C:\\Python33"
TOX_ENV: "py33"
- PYTHON: "C:\\Python34"
TOX_ENV: "py34"
- PYTHON: "C:\\Python35"
TOX_ENV: "py35"
init:
- "%PYTHON%/python -V"
- "%PYTHON%/python -c \"import struct;print( 8 * struct.calcsize(\'P\'))\""
install:
- "%PYTHON%/Scripts/easy_install -U pip"
- "%PYTHON%/Scripts/pip install tox"
- "%PYTHON%/Scripts/pip install wheel"
build: false # Not a C# project, build stuff at the test step instead.
test_script:
- "%PYTHON%/Scripts/tox -e %TOX_ENV%"
after_test:
- "%PYTHON%/python setup.py bdist_wheel"
- ps: "ls dist"
artifacts:
- path: dist\*
#on_success:
# - TODO: upload the content of dist/*.whl to a public wheelhouse
================================================
FILE: codecov.yml
================================================
comment:
layout: header, changes, diff
coverage:
ignore:
- gitsome/lib/*
- gitsome/compat.py
================================================
FILE: gitsome/__init__.py
================================================
# -*- coding: utf-8 -*-
# Copyright 2015 Donne Martin. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# or in the "license" file accompanying this file. This file is
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.
__version__ = '0.8.4'
================================================
FILE: gitsome/compat.py
================================================
# -*- coding: utf-8 -*-
# Copyright 2015 Donne Martin. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# or in the "license" file accompanying this file. This file is
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.
import sys
import urllib
try:
# Python 3
import configparser
from urllib.parse import urlparse
from urllib.request import urlretrieve
from urllib.error import URLError
except ImportError:
# Python 2
import ConfigParser as configparser
from urlparse import urlparse
from urllib import urlretrieve
from urllib2 import URLError
if sys.version_info < (3, 3):
import HTMLParser
else:
import html as HTMLParser
================================================
FILE: gitsome/completer.py
================================================
# -*- coding: utf-8 -*-
# Copyright 2015 Donne Martin. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# or in the "license" file accompanying this file. This file is
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.
from __future__ import unicode_literals
from __future__ import print_function
from prompt_toolkit.completion import Completer, Completion
from .completions import COMPLETIONS_GH, SUBCOMMANDS
from .completions_git import META_LOOKUP_GIT, META_LOOKUP_GIT_EXTRAS
from .utils import TextUtils
class CompleterGitsome(Completer):
"""Gitsome prompt toolkit completer.
:type text_utils: :class:`utils.TextUtils`
:param text_utils: An instance of `utils.TextUtils`.
:type fuzzy_match: bool
:param fuzzy_match: Determines whether to use fuzzy matching.
Currently, this is always set to False but can be enabled.
"""
def __init__(self):
self.fuzzy_match = False
self.text_utils = TextUtils()
def build_completions_with_meta(self, line, prefix, completions):
"""Build prompt_toolkit Completions with meta info.
:type line: list
:param line: The input text as a list of words.
:type prefix: string
:param prefix: The current word.
:type completions: list
:param completions: Completions to build meta info for.
:rtype: list
:return: Completions with meta info.
"""
completions_with_meta = []
tokens = line.split(' ')
if tokens[0] != 'gh':
for comp in completions:
display = None
display_meta = None
if 'git' in line and comp.strip() in META_LOOKUP_GIT:
display_meta = META_LOOKUP_GIT[comp.strip()]
elif 'git' in line and comp.strip() in META_LOOKUP_GIT_EXTRAS:
display_meta = META_LOOKUP_GIT_EXTRAS[comp.strip()]
completions_with_meta.append(
Completion(comp,
-len(prefix),
display=display,
display_meta=display_meta))
return completions_with_meta
def completing_command(self, words, word_before_cursor):
"""Determine if we are currently completing the gh command.
:type words: list
:param words: The input text broken into word tokens.
:type word_before_cursor: str
:param word_before_cursor: The current word before the cursor,
which might be one or more blank spaces.
:rtype: bool
:return: Specifies whether we are currently completing the gh command.
"""
if len(words) == 1 and word_before_cursor != '':
return True
else:
return False
def completing_subcommand(self, words, word_before_cursor):
"""Determine if we are currently completing a subcommand.
:type words: list
:param words: The input text broken into word tokens.
:type word_before_cursor: str
:param word_before_cursor: The current word before the cursor,
which might be one or more blank spaces.
:rtype: bool
:return: Specifies whether we are currently completing a subcommand.
"""
if (len(words) == 1 and word_before_cursor == '') \
or (len(words) == 2 and word_before_cursor != ''):
return True
else:
return False
def completing_arg(self, words, word_before_cursor):
"""Determine if we are currently completing an arg.
:type words: list
:param words: The input text broken into word tokens.
:type word_before_cursor: str
:param word_before_cursor: The current word before the cursor,
which might be one or more blank spaces.
:rtype: bool
:return: Specifies whether we are currently completing an arg.
"""
if (len(words) == 2 and word_before_cursor == '') \
or (len(words) == 3 and word_before_cursor != ''):
return True
else:
return False
def completing_subcommand_option(self, words, word_before_cursor):
"""Determine if we are currently completing an option.
:type words: list
:param words: The input text broken into word tokens.
:type word_before_cursor: str
:param word_before_cursor: The current word before the cursor,
which might be one or more blank spaces.
:rtype: list
:return: A list of options.
"""
options = []
for subcommand, args_opts in COMPLETIONS_GH.items():
if subcommand in words and \
(words[-2] == subcommand or
self.completing_subcommand_option_util(subcommand, words)):
options.extend(COMPLETIONS_GH[subcommand]['opts'])
return options
def completing_subcommand_option_util(self, option, words):
"""Determine if we are currently completing an option.
Called by completing_subcommand_option as a utility method.
:type words: list
:param words: The input text broken into word tokens.
:type word_before_cursor: str
:param word_before_cursor: The current word before the cursor,
which might be one or more blank spaces.
:rtype: bool
:return: Specifies whether we are currently completing an option.
"""
# Example: Return True for: gh view 1 --pag
if len(words) > 3:
if option in words:
return True
return False
def arg_completions(self, words, word_before_cursor):
"""Generates arguments completions based on the input.
:type words: list
:param words: The input text broken into word tokens.
:type word_before_cursor: str
:param word_before_cursor: The current word before the cursor,
which might be one or more blank spaces.
:rtype: list
:return: A list of completions.
"""
if 'gh' not in words:
return []
for subcommand, args_opts in COMPLETIONS_GH.items():
if subcommand in words:
args = list(COMPLETIONS_GH[subcommand]['args'].keys())
if not args:
# Some commands don't have args, complete options instead.
args = list(COMPLETIONS_GH[subcommand]['opts'].keys())
return args if args else []
return []
def get_completions(self, document, _):
"""Get completions for the current scope.
:type document: :class:`prompt_toolkit.Document`
:param document: An instance of `prompt_toolkit.Document`.
:type _: :class:`prompt_toolkit.completion.Completion`
:param _: (Unused).
:rtype: generator
:return: Yields an instance of `prompt_toolkit.completion.Completion`.
"""
word_before_cursor = document.get_word_before_cursor(WORD=True)
words = self.text_utils.get_tokens(document.text)
commands = []
if len(words) == 0:
return commands
if self.completing_command(words, word_before_cursor):
commands = ['gh']
else:
if 'gh' not in words:
return commands
if self.completing_subcommand(words, word_before_cursor):
commands = list(SUBCOMMANDS.keys())
else:
if self.completing_arg(words, word_before_cursor):
commands = self.arg_completions(words, word_before_cursor)
else:
commands = self.completing_subcommand_option(
words,
word_before_cursor)
completions = self.text_utils.find_matches(
word_before_cursor, commands, fuzzy=self.fuzzy_match)
return completions
================================================
FILE: gitsome/completions.py
================================================
# -*- coding: utf-8 -*-
# Copyright 2015 Donne Martin. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# or in the "license" file accompanying this file. This file is
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.
COMPLETIONS_GH = {
'configure': {
'desc': "Configures gitsome.",
'args': {},
'opts': {
'-e': 'flag (opt) configure GitHub Enterprise.',
'--enterprise': 'flag (opt) configure GitHub Enterprise.',
},
},
'create-comment': {
'desc': 'Creates a comment on the given issue.',
'args': {
'octocat/Spoon-Knife/1': 'str (req) user/repo/issue_number combo.',
},
'opts': {
'-t': 'see associated -- option for details.',
'--text': 'str (req) comment text.',
},
},
'create-issue': {
'desc': 'Creates an issue.',
'args': {
'octocat/Spoon-Knife': 'str (req) user/repository combo.',
},
'opts': {
'-t': 'see associated -- option for details.',
'--issue_title': 'str (req) issue title.',
'-d': 'str (opt) issue description.',
'--issue_desc': 'str (opt) issue description.',
},
},
'create-repo': {
'desc': 'Creates a repository.',
'args': {
'Spoon-Knife': 'str (req) repository name.',
},
'opts': {
'-d': 'str (opt) repo description',
'--repo_desc': 'str (opt) repo description.',
'-pr': 'flag (opt) create a private repo',
'--private': 'flag (opt) create a private repo',
},
},
'emails': {
'desc': "Lists all the user's registered emails.",
'args': {},
'opts': {},
},
'emojis': {
'desc': 'Lists all GitHub supported emojis.',
'args': {},
'opts': {
'-p': 'flag (req) show results in a pager.',
'--pager': 'flag (req) show results in a pager.',
},
},
'feed': {
'desc': "Lists all activity for the given user or repo, if called with no arg, shows the logged in user's feed.",
'args': {
'octocat/Hello-World --pager': "str (opt) user or user/repository combo, if blank, shows the logged in user's feed.",
},
'opts': {
'-pr': 'flag (req) also show private events.',
'--private': 'flag (req) also show private events.',
'-p': 'flag (req) show results in a pager.',
'--pager': 'flag (req) show results in a pager.',
},
},
'followers': {
'desc': 'Lists all followers and the total follower count.',
'args': {
'octocat': "str (req) the user's login id, if blank, shows logged in user's info.",
},
'opts': {
'-p': 'flag (opt) show results in a pager.',
'--pager': 'flag (opt) show results in a pager.',
},
},
'following': {
'desc': 'Lists all followed users and the total followed count.',
'args': {
'octocat': "str (req) the user's login id, if blank, shows logged in user's info.",
},
'opts': {
'-p': 'flag (opt) show results in a pager.',
'--pager': 'flag (opt) show results in a pager.',
},
},
'gitignore-template': {
'desc': 'Outputs the gitignore template for the given language.',
'args': {
'Python': 'str (req) the language-specific .gitignore.',
},
'opts': {},
},
'gitignore-templates': {
'desc': 'Outputs all supported gitignore templates.',
'args': {},
'opts': {
'-p': 'flag (opt) show results in a pager.',
'--pager': 'flag (opt) show results in a pager.',
},
},
'issue': {
'desc': 'Outputs detailed information about the given issue.',
'args': {
'octocat/Spoon-Knife/1': 'str (req) user/repo/issue_number combo.',
},
'opts': {},
},
'issues': {
'desc': 'Lists all issues matching the filter.',
'args': {},
'opts': {
'-f': 'str (opt) "assigned", "created", "mentioned", "subscribed" (default).',
'--issue_filter': 'str (opt) "assigned", "created", "mentioned", "subscribed" (default).',
'-s': 'str (opt) "all", "open" (default), "closed".',
'--issue_state': 'str (opt) "all", "open" (default), "closed".',
'-l': 'flag (opt) num items to show, defaults to 1000.',
'--limit': 'flag (opt) num items to show, defaults to 1000.',
'-p': 'flag (opt) show results in a pager.',
'--pager': 'flag (opt) show results in a pager.',
},
},
'license': {
'desc': 'Outputs the license template for the given license.',
'args': {
'apache-2.0': 'str (req) the license name.',
},
'opts': {},
},
'licenses': {
'desc': 'Outputs all supported license templates.',
'args': {},
'opts': {},
},
'me': {
'desc': 'Lists information about the logged in user.',
'args': {},
'opts': {
'-b': 'flag (opt) view profile in a browser instead of the terminal.',
'--browser': 'flag (opt) view profile in a browser instead of the terminal.',
'-t': 'see associated -- option for details.',
'--text_avatar': 'flag (opt) view profile pic in plain text.',
'-l': 'flag (opt) num items to show, defaults to 1000.',
'--limit': 'flag (opt) num items to show, defaults to 1000.',
'-p': 'flag (opt) show results in a pager.',
'--pager': 'flag (opt) show results in a pager.',
},
},
'notifications': {
'desc': 'Lists all notifications.',
'args': {},
'opts': {
'-l': 'flag (opt) num items to show, defaults to 1000.',
'--limit': 'flag (opt) num items to show, defaults to 1000.',
'-p': 'flag (opt) show results in a pager.',
'--pager': 'flag (opt) show results in a pager.',
},
},
'octo': {
'desc': 'Outputs an Easter egg or the given message from Octocat.',
'args': {
'"Keep it logically awesome"': 'str (req) a message from Octocat, if empty, Octocat speaks an Easter egg.',
},
'opts': {},
},
'pull-request': {
'desc': 'Outputs detailed information about the given pull request.',
'args': {
'octocat/Spoon-Knife/3': 'str (req) user/repo/pull_number combo.',
},
'opts': {},
},
'pull-requests': {
'desc': 'Lists all pull requests.',
'args': {},
'opts': {
'-l': 'flag (opt) num items to show, defaults to 1000.',
'--limit': 'flag (opt) num items to show, defaults to 1000.',
'-p': 'flag (opt) show results in a pager.',
'--pager': 'flag (opt) show results in a pager.',
},
},
'rate-limit': {
'desc': 'Outputs the rate limit.',
'args': {},
'opts': {},
},
'repo': {
'desc': 'Outputs detailed information about the given repo.',
'args': {
'octocat/Spoon-Knife': 'str (req) user/repository combo.',
},
'opts': {},
},
'repos': {
'desc': 'Lists all repos matching the given filter.',
'args': {
'"foo bar optional filter"': 'str (opt) filters repos by name.',
},
'opts': {
'-l': 'flag (opt) num items to show, defaults to 1000.',
'--limit': 'flag (opt) num items to show, defaults to 1000.',
'-p': 'flag (opt) show results in a pager.',
'--pager': 'flag (opt) show results in a pager.',
},
},
'search-issues': {
'desc': 'Searches for all issues matching the given query.',
'args': {
'"foobarbaz in:title created:>=2015-01-01"': 'str (req) the search query.',
},
'opts': {
'-s': 'str (opt) "stars", "forks", "updated", if blank, sorts by query best match.',
'--sort': 'str (opt) "stars", "forks", "updated", if blank, sorts by query best match.',
'-l': 'flag (opt) num items to show, defaults to 1000.',
'--limit': 'flag (opt) num items to show, defaults to 1000.',
'-p': 'flag (opt) show results in a pager.',
'--pager': 'flag (opt) show results in a pager.',
},
},
'search-repos': {
'desc': 'Searches for all repos matching the given query.',
'args': {
'"created:>=2015-01-01 stars:>=1500 language:python"': 'str (req) the search query.',
},
'opts': {
'-s': 'str (opt) "stars", "forks", "updated", if blank, sorts by query best match.',
'--sort': 'str (opt) "stars", "forks", "updated", if blank, sorts by query best match.',
'-l': 'flag (opt) num items to show, defaults to 1000.',
'--limit': 'flag (opt) num items to show, defaults to 1000.',
'-p': 'flag (opt) show results in a pager.',
'--pager': 'flag (opt) show results in a pager.',
},
},
'starred': {
'desc': 'Outputs starred repos.',
'args': {
'"foo bar optional filter"': 'str (opt) filters repos by name.',
},
'opts': {
'-l': 'flag (opt) num items to show, defaults to 1000.',
'--limit': 'flag (opt) num items to show, defaults to 1000.',
'-p': 'flag (opt) show results in a pager.',
'--pager': 'flag (opt) show results in a pager.',
},
},
'trending': {
'desc': 'Lists trending repos for the given language.',
'args': {
'Overall': 'str (opt) the language filter for trending repos, if blank, the overall rankings are shown.',
},
'opts': {
'-w': 'flag (opt) show the weekly trending repos.',
'--weekly': 'flag (opt) show the weekly trending repos.',
'-m': 'flag (opt) show the monthly trending repos.',
'--monthly': 'flag (opt) show the monthly trending repos.',
'-D': 'flag (opt) view trending devs. Only valid with -b/--browser.',
'--devs': 'flag (opt) view trending devs. Only valid with -b/--browser.',
'-b': 'flag (opt) view profile in a browser instead of the terminal.',
'--browser': 'flag (opt) view profile in a browser instead of the terminal.',
'-p': 'flag (opt) show results in a pager.',
'--pager': 'flag (opt) show results in a pager.',
},
},
'user': {
'desc': 'Lists information about the given user.',
'args': {
'github --pager': "str (req) the user's login id.",
},
'opts': {
'-b': 'flag (opt) view profile in a browser instead of the terminal.',
'--browser': 'flag (opt) view profile in a browser instead of the terminal.',
'-t': 'see associated -- option for details.',
'--text_avatar': 'flag (opt) view profile pic in plain text.',
'-l': 'flag (opt) num items to show, defaults to 1000.',
'--limit': 'flag (opt) num items to show, defaults to 1000.',
'-p': 'flag (opt) show results in a pager.',
'--pager': 'flag (opt) show results in a pager.',
},
},
'view': {
'desc': 'Views the given repo or issue index in the terminal or a browser.',
'args': {
'1': 'int (req) the 1-based index to view.',
},
'opts': {
'-b': 'flag (opt) view profile in a browser instead of the terminal.',
'--browser': 'flag (opt) view profile in a browser instead of the terminal.',
},
},
}
META_LOOKUP_GH = {
'10': 'limit: int (opt) limits the posts displayed',
'"(?i)(Python|Django)"': ('regex_query: string (opt) applies a regular '
'expression comment filter'),
'1': 'index: int (req) views the post index',
'"user"': 'user:string (req) shows info on the specified user',
'gh': 'Git auto-completer with GitHub integration.',
}
SUBCOMMANDS = {}
def build_meta_lookups():
for subcommand, args_opts in COMPLETIONS_GH.items():
META_LOOKUP_GH.update({subcommand: COMPLETIONS_GH[subcommand]['desc']})
SUBCOMMANDS.update({subcommand: COMPLETIONS_GH[subcommand]['desc']})
for opt, meta in args_opts['opts'].items():
META_LOOKUP_GH.update({opt: meta})
for arg, meta in args_opts['args'].items():
META_LOOKUP_GH.update({arg: meta})
build_meta_lookups()
================================================
FILE: gitsome/completions_git.py
================================================
# -*- coding: utf-8 -*-
# Copyright 2015 Donne Martin. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# or in the "license" file accompanying this file. This file is
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.
META_LOOKUP_GIT = {
'git': 'The stupid content tracker.',
'--version': 'Prints the Git suite version that the git program came from.',
'--help': 'Prints the synopsis and a list of the most commonly used commands.',
'-C': 'Run as if git was started in <path> instead of the current working directory.',
'-c': 'Pass a configuration parameter to the command.',
'--exec-path': 'Path to wherever your core Git programs are installed.',
'--html-path': "Print the path, without trailing slash, where Git's HTML documentation is installed and exit.",
'--man-path': 'Print the manpath (see man(1)) for the man pages for this version of Git and exit.',
'--info-path': 'Print the path where the Info files documenting this version of Git are installed and exit.',
'-p': 'Pipe all output into less (or if set, $PAGER) if standard output is a terminal.',
'--paginate': 'Pipe all output into less (or if set, $PAGER) if standard output is a terminal.',
'--no-pager': 'Do not pipe Git output into a pager.',
'--git-dir=<path>': 'Set the path to the repository. This can also be controlled by setting the GIT_DIR environment variable.',
'--work-tree=<path>': 'Set the path to the working tree. It can be an absolute path or a path relative to the current working directory.',
'--namespace=<path>': 'Set the Git namespace. See gitnamespaces(7) for more details.',
'--bare': 'Treat the repository as a bare repository. If GIT_DIR environment is not set, it is set to the current working directory.',
'--no-replace-objects': 'Do not use replacement refs to replace Git objects.',
'--literal-pathspecs': 'Treat pathspecs literally (i.e. no globbing, no pathspec magic).',
'--glob-pathspecs': 'Add "glob" magic to all pathspec.',
'--noglob-pathspecs': 'Add "literal" magic to all pathspec.',
'--icase-pathspecs': 'Add "icase" magic to all pathspec.',
'add': 'Add file contents to the index.',
'am': 'Apply a series of patches from a mailbox.',
'amend': 'Amend the previous commit.',
'archive': 'Create an archive of files from a named tree.',
'bisect': 'Use binary search to find the commit that introduced a bug.',
'branch': 'List, create, or delete branches.',
'branches': 'List all branches, including remotes.',
'bundle': 'Move objects and refs by archive.',
'c': 'Alias for git clone.',
'ca': 'Alias for git add -A && git commit -av.',
'checkout': 'Switch branches or restore working tree files.',
'cherry-pick': 'Apply the changes introduced by some existing commits.',
'citool': 'Graphical alternative to git-commit.',
'clean': 'Remove untracked files from the working tree.',
'clone': 'Clone a repository into a new directory.',
'commit': 'Record changes to the repository.',
'contributors': 'List repo contributors.',
'describe': 'Describe a commit using the most recent tag reachable from it.',
'diff': 'Show changes between commits, commit and working tree, etc.',
'fetch': 'Download objects and refs from another repository.',
'flow': 'Git branching model extensions.',
'format-patch': 'Prepare patches for e-mail submission.',
'gc': 'Cleanup unnecessary files and optimize the local repository.',
'grep': 'Print lines matching a pattern.',
'gui': 'A portable graphical interface to Git.',
'init': 'Create an empty Git repository or reinitialize an existing one.',
'log': 'Show commit logs.',
'merge': 'Join two or more development histories together.',
'mv': 'Move or rename a file, a directory, or a symlink.',
'notes': 'Add or inspect object notes.',
'pull': 'Fetch from and integrate with another repository or a local branch.',
'push': 'Update remote refs along with associated objects.',
'rebase': 'Forward-port local commits to the updated upstream head.',
'reset': 'Reset current HEAD to the specified state.',
'revert': 'Revert some existing commits.',
'rm': 'Remove files from the working tree and from the index.',
'shortlog': 'Summarize git log output.',
'show': 'Show various types of objects.',
'stage': 'Add file contents to the staging area.',
'stash': 'Stash the changes in a dirty working directory away.',
'status': 'Show the working tree status.',
'submodule': 'Initialize, update or inspect submodules.',
'tag': 'Create, list, delete or verify a tag object signed with GPG.',
'tags': 'List all tags.',
'worktree': 'Manage multiple working trees.',
'gitk': 'The Git repository browser.',
'config': 'Get and set repository or global options.',
'fast-export': 'Git data exporter.',
'fast-import': 'Backend for fast Git data importers.',
'filter-branch': 'Rewrite branches.',
'mergetool': 'Run merge conflict resolution tools to resolve merge conflicts.',
'pack-refs': 'Pack heads and tags for efficient repository access.',
'prune': 'Prune all unreachable objects from the object database.',
'reflog': 'Manage reflog information.',
'relink': 'Hardlink common objects in local repositories.',
'remote': 'Manage set of tracked repositories.',
'remotes': 'List set of tracked repositories.',
'repack': 'Pack unpacked objects in a repository.',
'replace': 'Create, list, delete refs to replace objects.',
'annotate': 'Annotate file lines with commit information.',
'blame': 'Show what revision and author last modified each line of a file.',
'cherry': 'Find commits yet to be applied to upstream.',
'count-objects': 'Count unpacked number of objects and their disk consumption.',
'difftool': 'Show changes using common diff tools.',
'fsck': 'Verifies the connectivity and validity of the objects in the database.',
'get-tar-commit-id': 'Extract commit ID from an archive created using git-archive.',
'help': 'Display help information about Git.',
'instaweb': 'Instantly browse your working repository in gitweb.',
'merge-tree': 'Show three-way merge without touching index.',
'rerere': 'Reuse recorded resolution of conflicted merges.',
'rev-parse': 'Pick out and massage parameters.',
'show-branch': 'Show branches and their commits.',
'verify-commit': 'Check the GPG signature of commits.',
'verify-tag': 'Check the GPG signature of tags.',
'whatchanged': 'Show logs with difference each commit introduces.',
'gitweb': 'Git web interface (web frontend to Git repositories).',
'archimport': 'Import an Arch repository into Git.',
'cvsexportcommit': 'Export a single commit to a CVS checkout.',
'cvsimport': 'Salvage your data out of another SCM people love to hate.',
'cvsserver': 'A CVS server emulator for Git.',
'imap-send': 'Send a collection of patches from stdin to an IMAP folder.',
'p4': 'Import from and submit to Perforce repositories.',
'quiltimport': 'Applies a quilt patchset onto the current branch.',
'request-pull': 'Generates a summary of pending changes.',
'send-email': 'Send a collection of patches as emails.',
'svn': 'Bidirectional operation between a Subversion repository and Git.',
'apply': 'Apply a patch to files and/or to the index.',
'checkout-index': 'Copy files from the index to the working tree.',
'commit-tree': 'Create a new commit object.',
'hash-object': 'Compute object ID and optionally creates a blob from a file.',
'index-pack': 'Build pack index file for an existing packed archive.',
'lfs': 'Git extension for versioning large files.',
'merge-file': 'Run a three-way file merge.',
'merge-index': 'Run a merge for files needing merging.',
'mktag': 'Creates a tag object.',
'mktree': 'Build a tree-object from ls-tree formatted text.',
'pack-objects': 'Create a packed archive of objects.',
'prune-packed': 'Remove extra objects that are already in pack files.',
'read-tree': 'Reads tree information into the index.',
'symbolic-ref': 'Read, modify and delete symbolic refs.',
'unpack-objects': 'Unpack objects from a packed archive.',
'update-index': 'Register file contents in the working tree to the index.',
'update-ref': 'Update the object name stored in a ref safely.',
'write-tree': 'Create a tree object from the current index.',
'cat-file': 'Provide content or type and size information for repository objects.',
'diff-files': 'Compares files in the working tree and the index.',
'diff-index': 'Compare a tree to the working tree or index.',
'diff-tree': 'Compares the content and mode of blobs found via two tree objects.',
'for-each-ref': 'Output information on each ref.',
'ls-files': 'Show information about files in the index and the working tree.',
'ls-remote': 'List references in a remote repository.',
'ls-tree': 'List the contents of a tree object.',
'merge-base': 'Find as good common ancestors as possible for a merge.',
'name-rev': 'Find symbolic names for given revs.',
'pack-redundant': 'Find redundant pack files.',
'rev-list': 'Lists commit objects in reverse chronological order.',
'show-index': 'Show packed archive index.',
'show-ref': 'List references in a local repository.',
'unpack-file': "Creates a temporary file with a blob's contents.",
'var': 'Show a Git logical variable.',
'verify-pack': 'Validate packed Git archive files.',
'daemon': 'A really simple server for Git repositories.',
'fetch-pack': 'Receive missing objects from another repository.',
'http-backend': 'Server side implementation of Git over HTTP.',
'send-pack': 'Push objects over Git protocol to another repository.',
'update-server-info': 'Update auxiliary info file to help dumb servers.',
'http-fetch': 'Download from a remote Git repository via HTTP.',
'http-push': 'Push objects over HTTP/DAV to another repository.',
'parse-remote': 'Routines to help parsing remote repository access parameters.',
'receive-pack': 'Receive what is pushed into the repository.',
'shell': 'Restricted login shell for Git-only SSH access.',
'upload-archive': 'Send archive back to git-archive.',
'upload-pack': 'Send objects packed back to git-fetch-pack.',
'check-attr': 'Display gitattributes information.',
'check-ignore': 'Debug gitignore / exclude files.',
'check-mailmap': 'Show canonical names and email addresses of contacts.',
'check-ref-format': 'Ensures that a reference name is well formed.',
'column': 'Display data in columns.',
'credential': 'Retrieve and store user credentials.',
'credential-cache': 'Helper to temporarily store passwords in memory.',
'credential-store': 'Helper to store credentials on disk.',
'fmt-merge-msg': 'Produce a merge commit message.',
'interpret-trailers': 'help add structured information into commit messages.',
'mailinfo': 'Extracts patch and authorship from a single e-mail message.',
'mailsplit': 'Simple UNIX mbox splitter program.',
'merge-one-file': 'The standard helper program to use with git-merge-index.',
'patch-id': 'Compute unique ID for a patch.',
'sh-i18n': "Git's i18n setup code for shell scripts.",
'sh-setup': 'Common Git shell script setup code.',
'stripspace': 'Remove unnecessary whitespace.',
'subtree': 'Merge subtrees together and split repository into subtrees.',
'git-cvsserver': 'A CVS server emulator for Git.',
'git-credential-osxkeychain': 'Cache GitHub credentials in the OS X Keychain.',
'git-lfs': 'Git extension for versioning large files.',
'git-receive-pack': 'Receive what is pushed into the repository',
'git-shell': 'Restricted login shell for Git-only SSH access.',
'git-subtree': 'Merge subtrees together and split repository into subtrees.',
'git-upload-archive': 'Send archive back to git-archive.',
'git-upload-pack': 'Send objects packed back to git-fetch-pack.',
'git-flow': 'Git branching model extensions.',
'gitchangelog': 'Generates a changelog from git tags and commit messages.',
}
META_LOOKUP_GIT_EXTRAS = {
'git-extras': 'Various Git utilities.',
'git-alias': 'Define, search and show aliases.',
'git-archive-file': 'Export the current HEAD of the git repository to a archive.',
'git-authors': 'Generate authors report.',
'git-back': 'Undo and Stage latest commits.',
'git-bug': 'Create bug branch.',
'git-changelog': 'Generate a changelog report.',
'git-chore': 'Create chore branch.',
'git-clear': 'Rigorously clean up a repository.',
'git-commits-since': 'Show commit logs since some date.',
'git-contrib': "Show user's contributions",
'git-count': 'Show commit count.',
'git-create-branch': 'Create branches.',
'git-delete-branch': 'Delete branches.',
'git-delete-merged-branches': 'Delete merged branches.',
'git-delete-submodule': 'Delete submodules.',
'git-delete-tag': 'Delete tags.',
'git-delta': 'Lists changed files.',
'git-effort': 'Show effort statistics on file(s).',
'git-feature': 'Create/Merge feature branch.',
'git-fork': 'Fork a repo on github.',
'git-fresh-branch': 'Create fresh branches.',
'git-gh-pages': 'Create the GitHub Pages branch.',
'git-graft': 'Merge and destroy a given branch.',
'git-guilt': 'calculate change between two revisions.',
'git-ignore-io': 'Get sample gitignore file.',
'git-ignore': 'Add .gitignore patterns.',
'git-info': 'Returns information on current repository.',
'git-line-summary': 'Show repository summary by line.',
'git-local-commits': 'List local commits.',
'git-lock': 'Lock a file excluded from version control.',
'git-locked': 'ls files that have been locked.',
'git-merge-into': 'Merge one branch into another.',
'git-merge-repo': 'Merge two repo histories.',
'git-missing': 'Show commits missing from another branch.',
'git-obliterate': 'Completely remove a file from the repository, including past commits and tags.',
'git-pr': 'Checks out a pull request locally.',
'git-psykorebase': 'Rebase a branch with a merge commit.',
'git-pull-request': 'Checks out a pull request from GitHub.',
'git-rebase-patch': 'Rebases a patch.',
'git-refactor': 'Create refactor branch.',
'git-release': 'Commit, tag and push changes to the repository.',
'git-rename-tag': 'Rename a tag.',
'git-repl': 'git read-eval-print-loop.',
'git-reset-file': 'Reset one file.',
'git-root': 'show path of root.',
'git-rscp': 'Copies specific files from the working directory of a remote repository to the current working directory.',
'git-scp': 'Copy files to SSH compatible git-remote.',
'git-sed': 'replace patterns in git-controlled files.',
'git-setup': 'Set up a git repository.',
'git-show-merged-branches': 'Show merged branches.',
'git-show-tree': 'show branch tree of commit history.',
'git-show-unmerged-branches': 'Show unmerged branches.',
'git-squash': 'Import changes from a branch.',
'git-summary': 'Show repository summary.',
'git-touch': 'Touch and add file to the index.',
'git-undo': 'Remove latest commits.',
'git-unlock': 'Unlock a file excluded from version control.',
'extras': 'Various Git utilities.',
'alias': 'Define, search and show aliases.',
'archive-file': 'Export the current HEAD of the git repository to a archive.',
'authors': 'Generate authors report.',
'back': 'Undo and Stage latest commits.',
'bug': 'Create bug branch.',
'changelog': 'Generate a changelog report.',
'chore': 'Create chore branch.',
'clear': 'Rigorously clean up a repository.',
'commits-since': 'Show commit logs since some date.',
'contrib': "Show user's contributions",
'count': 'Show commit count.',
'create-branch': 'Create branches.',
'delete-branch': 'Delete branches.',
'delete-merged-branches': 'Delete merged branches.',
'delete-submodule': 'Delete submodules.',
'delete-tag': 'Delete tags.',
'delta': 'Lists changed files.',
'effort': 'Show effort statistics on file(s).',
'feature': 'Create/Merge feature branch.',
'fork': 'Fork a repo on github.',
'fresh-branch': 'Create fresh branches.',
'gh-pages': 'Create the GitHub Pages branch.',
'graft': 'Merge and destroy a given branch.',
'guilt': 'calculate change between two revisions.',
'ignore-io': 'Get sample gitignore file.',
'ignore': 'Add .gitignore patterns.',
'info': 'Returns information on current repository.',
'line-summary': 'Show repository summary by line.',
'local-commits': 'List local commits.',
'lock': 'Lock a file excluded from version control.',
'locked': 'ls files that have been locked.',
'merge-into': 'Merge one branch into another.',
'merge-repo': 'Merge two repo histories.',
'missing': 'Show commits missing from another branch.',
'obliterate': 'Completely remove a file from the repository, including past commits and tags.',
'pr': 'Checks out a pull request locally.',
'psykorebase': 'Rebase a branch with a merge commit.',
'pull-request': 'Checks out a pull request from GitHub.',
'rebase-patch': 'Rebases a patch.',
'refactor': 'Create refactor branch.',
'release': 'Commit, tag and push changes to the repository.',
'rename-tag': 'Rename a tag.',
'repl': 'git read-eval-print-loop.',
'reset-file': 'Reset one file.',
'root': 'show path of root.',
'rscp': 'Copies specific files from the working directory of a remote repository to the current working directory.',
'scp': 'Copy files to SSH compatible git-remote.',
'sed': 'replace patterns in git-controlled files.',
'setup': 'Set up a git repository.',
'show-merged-branches': 'Show merged branches.',
'show-tree': 'show branch tree of commit history.',
'show-unmerged-branches': 'Show unmerged branches.',
'squash': 'Import changes from a branch.',
'summary': 'Show repository summary.',
'touch': 'Touch and add file to the index.',
'undo': 'Remove latest commits.',
'unlock': 'Unlock a file excluded from version control.',
}
================================================
FILE: gitsome/config.py
================================================
# -*- coding: utf-8 -*-
# Copyright 2015 Donne Martin. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# or in the "license" file accompanying this file. This file is
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.
from __future__ import unicode_literals
from __future__ import print_function
import click
from getpass import getpass
import os
import requests
from requests.packages.urllib3.exceptions import InsecureRequestWarning
from .compat import configparser
from .lib.github3 import authorize, enterprise_login, login
from .lib.github3.exceptions import AuthenticationFailed, UnprocessableEntity
class Config(object):
"""Gitsome config.
:type api: :class:`github3.github.Github`
:param api: An instance of github3.github.Github.
:type clr_x: str
:param clr_x: Various ansi color config colors to use for highlights.
:type CONFIG: str
:param CONFIG: The config file name.
:type CONFIG_SECTION: str
:param CONFIG_SECTION: The main config file section label.
:type CONFIG_CLR_X: str
:param CONFIG_CLR_X: Various ansi color config labels to use for highlights.
:type CONFIG_ENTERPRISE_URL: str
:param CONFIG_ENTERPRISE_URL: The GitHub Enterprise url.
:type CONFIG_USER_LOGIN: str
:param CONFIG_USER_LOGIN: The user login.
:type CONFIG_USER_PASS: str
:param CONFIG_USER_PASS: The user password.
:type CONFIG_USER_TOKEN: str
:param CONFIG_USER_TOKEN: The user token.
:type CONFIG_USER_FEED: str
:param CONFIG_USER_FEED: The user feed config. This is the feed on
https://github.com/ when logged in and requires the basic auth model,
which doesn't work when logging in with tokens or 2FA. This config
listed the pre-signed url to access the feed.
:type CONFIG_URL: str
:param CONFIG_URL: The config file name that contains urls used in the
`gh view` command.
:type CONFIG_URL_SECTION: str
:param CONFIG_URL_SECTION: The config file section that contains urls used
in the `gh view [url_index]` command.
:type CONFIG_URL_LIST: str
:param CONFIG_URL_LIST: The config containing a list of the last set of
urls the user has seen, which allows the user to quickly access a repo
url with the `gh view [url_index]` command.
:type CONFIG_VERIFY_SSL: str
:param CONFIG_VERIFY_SSL: Determines whether to verify SSL certs.
:type enterprise_url: str
:param enterprise_url: The GitHub Enterprise url.
:type urls: list
:param urls: The last set of urls the user has seen, which allows the user
to quickly access a repo url with the gh view [url_index] command.
:type user_login: str
:param user_login: The user's login in ~/.gitsomeconfig.
:type user_pass: str
:param user_pass: The user's pass in ~/.gitsomeconfig.
This is only stored for GitHub Enterprise users since using only a
personal access token does not seem to be supported.
:type user_token: str
:param user_token: The user's token in ~/.gitsomeconfig.
:type verify_ssl: bool
:param verify_ssl: Determines whether to verify SSL certs.
:type enable_avatar: bool
:param enable_avatar: Determines whether to request avatar image.
"""
CONFIG = '.gitsomeconfig'
CONFIG_CLR_PRIMARY = 'clr_primary'
CONFIG_CLR_SECONDARY = 'clr_secondary'
CONFIG_CLR_TERTIARY = 'clr_tertiary'
CONFIG_CLR_QUATERNARY = 'clr_quaternary'
CONFIG_CLR_BOLD = 'clr_bold'
CONFIG_CLR_CODE = 'clr_code'
CONFIG_CLR_ERROR = 'clr_error'
CONFIG_CLR_HEADER = 'clr_header'
CONFIG_CLR_LINK = 'clr_link'
CONFIG_CLR_LIST = 'clr_list'
CONFIG_CLR_MESSAGE = 'clr_message'
CONFIG_CLR_NUM_COMMENTS = 'clr_num_comments'
CONFIG_CLR_NUM_POINTS = 'clr_num_points'
CONFIG_CLR_TAG = 'clr_tag'
CONFIG_CLR_TIME = 'clr_time'
CONFIG_CLR_TITLE = 'clr_title'
CONFIG_CLR_TOOLTIP = 'clr_tooltip'
CONFIG_CLR_USER = 'clr_user'
CONFIG_CLR_VIEW_LINK = 'clr_view_link'
CONFIG_CLR_VIEW_INDEX = 'clr_view_index'
CONFIG_SECTION = 'github'
CONFIG_USER_LOGIN = 'user_login'
CONFIG_USER_PASS = 'user_pass'
CONFIG_USER_TOKEN = 'user_token'
CONFIG_USER_FEED = 'user_feed'
CONFIG_ENTERPRISE_URL = 'enterprise_url'
CONFIG_VERIFY_SSL = 'verify_ssl'
CONFIG_URL = '.gitsomeconfigurl'
CONFIG_URL_SECTION = 'url'
CONFIG_URL_LIST = 'url_list'
CONFIG_AVATAR = '.gitsomeconfigavatar.png'
CONFIG_ENABLE_AVATAR = 'enable_avatar'
def __init__(self):
self.api = None
self.user_login = None
self.user_pass = None
self.user_token = None
self.user_feed = None
self.enterprise_url = None
self.verify_ssl = True
self.urls = []
self.enable_avatar = True
self._init_colors()
self.load_configs([
self.load_config_colors,
])
self.login = login
self.authorize = authorize
self.getpass = getpass
def _init_colors(self):
"""Initialize colors to their defaults."""
self.clr_primary = None
self.clr_secondary = 'green'
self.clr_tertiary = 'cyan'
self.clr_quaternary = 'yellow'
self.clr_bold = 'cyan'
self.clr_code = 'cyan'
self.clr_error = 'red'
self.clr_header = 'yellow'
self.clr_link = 'green'
self.clr_list = 'cyan'
self.clr_message = None
self.clr_num_comments = 'green'
self.clr_num_points = 'green'
self.clr_tag = 'cyan'
self.clr_time = 'yellow'
self.clr_title = None
self.clr_tooltip = None
self.clr_user = 'cyan'
self.clr_view_link = 'magenta'
self.clr_view_index = 'magenta'
def authenticate_cached_credentials(self, config, parser,
enterprise_auth=enterprise_login):
"""Authenticate with the user's credentials in ~/.gitsomeconfig.
:type config: str
:param config: The config path.
:type parser: :class:`ConfigParser.RawConfigParser`
:param parser: An instance of `ConfigParser.RawConfigParser.
"""
with open(config) as config_file:
try:
parser.read_file(config_file)
except AttributeError:
parser.readfp(config_file)
self.user_login = self.load_config(
parser=parser,
cfg_label=self.CONFIG_USER_LOGIN)
self.user_pass = self.load_config(
parser=parser,
cfg_label=self.CONFIG_USER_PASS)
self.user_token = self.load_config(
parser=parser,
cfg_label=self.CONFIG_USER_TOKEN)
self.enterprise_url = self.load_config(
parser=parser,
cfg_label=self.CONFIG_ENTERPRISE_URL)
self.verify_ssl = self.load_config(
parser=parser,
cfg_label=self.CONFIG_VERIFY_SSL,
boolean_config=True)
self.enable_avatar = self.load_config(
parser=parser,
cfg_label=self.CONFIG_ENABLE_AVATAR,
boolean_config=True)
self.user_feed = self.load_config(
parser=parser,
cfg_label=self.CONFIG_USER_FEED)
if not self.verify_ssl:
# The user has chosen not to verify SSL certs.
# Disable warnings related to this option.
requests.packages.urllib3.disable_warnings(
InsecureRequestWarning)
login_kwargs = {
'username': self.user_login,
'two_factor_callback': self.request_two_factor_code,
}
if self.enterprise_url is not None:
self.login = enterprise_auth
login_kwargs.update({
'url': self.enterprise_url,
'verify': self.verify_ssl,
})
if self.user_token is not None:
login_kwargs.update({'token': self.user_token})
elif self.user_pass is not None:
login_kwargs.update({'password': self.user_pass})
else:
self.print_auth_error()
return
else:
login_kwargs.update({'token': self.user_token})
self.api = self.login(**login_kwargs)
def authenticate(self, enterprise=False,
enterprise_auth=enterprise_login, overwrite=False):
"""Log into GitHub.
Adapted from https://github.com/sigmavirus24/github-cli.
:type enterprise: bool
:param enterprise: Determines whether to configure GitHub Enterprise.
Default: False.
:type overwrite: bool
:param overwrite: indicates whether we cant to overwrite the current
set of credentials. Default: False.
"""
if self.api is not None and not overwrite:
return
# Get the full path to the configuration file.
config = self.get_github_config_path(self.CONFIG)
parser = configparser.RawConfigParser()
# Check to make sure the file exists and we are allowed to read it.
# Skip if we want to overwrite the auth settings.
if os.path.isfile(config) and os.access(config, os.R_OK | os.W_OK) and \
not overwrite:
with open(config) as config_file:
try:
parser.read_file(config_file)
except AttributeError:
parser.readfp(config_file)
self.authenticate_cached_credentials(config, parser)
else:
# The file didn't exist or we don't have the correct permissions.
login_kwargs = {
'two_factor_callback': self.request_two_factor_code,
}
if enterprise:
self.login = enterprise_auth
while not self.enterprise_url:
self.enterprise_url = input('Enterprise URL: ')
if click.confirm('Do you want to verify SSL certs?',
default=True):
self.verify_ssl = True
else:
self.verify_ssl = False
login_kwargs.update({
'url': self.enterprise_url,
'verify': self.verify_ssl,
})
while not self.user_login:
self.user_login = input('User Login: ')
login_kwargs.update({'username': self.user_login})
if click.confirm(('Do you want to log in with a password [Y] or '
'a personal access token [n]?'),
default=True):
user_pass = None
while not user_pass:
user_pass = self.getpass('Password: ')
login_kwargs.update({'password': user_pass})
try:
if not enterprise:
# Trade the user password for a personal access token.
# This does not seem to be available for Enterprise.
auth = self.authorize(
self.user_login,
user_pass,
scopes=['user', 'repo'],
note='gitsome',
note_url='https://github.com/donnemartin/gitsome',
two_factor_callback=self.request_two_factor_code
)
self.user_token = auth.token
else:
self.user_pass = user_pass
except (UnprocessableEntity, AuthenticationFailed):
click.secho('Error creating token.',
fg=self.clr_error)
click.secho(('Visit the following page and verify you do '
'not have an existing token named "gitsome":\n'
' https://github.com/settings/tokens\n'
'If a token already exists, update your '
'~/.gitsomeconfig file with your token:\n'
' user_token = TOKEN\n'
'You can also generate a new token.'),
fg=self.clr_message)
self.print_auth_error()
return
else:
# The user has chosen to authenticate with a token.
while not self.user_token:
self.user_token = input('Token: ')
login_kwargs.update({'token': self.user_token})
self.api = self.login(**login_kwargs)
if self.user_feed:
parser.set(self.CONFIG_SECTION,
self.CONFIG_USER_FEED,
self.user_feed)
def check_auth(self):
"""Check if the current authorization is valid.
This method uses the ratelimit_remaining api to check whether
the currently authenticated user's credentials are valid without
deducting from the rate limit. The ratelimit_remaining api does not
seem to be available for GitHub Enterprise.
github3.py's method check_authorization seems to only work given
an authorization created by a registered application.
TODO: Determine a better way to check the authorization for
GitHub Enterprise.
:type enterprise: bool
:param enterprise: Determines whether we are authenticating with
GitHub Enterprise.
"""
if self.enterprise_url is not None:
return True
try:
if self.api is not None:
# Throws AuthenticationFailed if invalid credentials but
# does not deduct from the rate limit.
self.api.ratelimit_remaining
return True
else:
self.print_auth_error()
except AuthenticationFailed:
self.print_auth_error()
return False
def get_github_config_path(self, config_file_name):
"""Attempt to find the github config file.
Adapted from https://github.com/sigmavirus24/github-cli.
:type config_file_name: str
:param config_file_name: The config file name.
:rtype: str
:return: The github config file path.
"""
home = os.path.abspath(os.environ.get('HOME', ''))
config_file_path = os.path.join(home, config_file_name)
return config_file_path
def load_config(self, parser, cfg_label, default=None,
color_config=False, boolean_config=False):
"""Load the specified config from ~/.gitsomeconfig.
:type parser: :class:`ConfigParser.RawConfigParser`
:param parser: An instance of `ConfigParser.RawConfigParser`.
:type cfg_label: str
:param cfg_label: The config label to load.
:type default: str
:param default: The default color if no color config exists.
Default: None.
:type color_config: bool
:param color_config: Determines whether this is a color config.
Default: False.
:type boolean_config: bool
:param boolean_config: Determines whether to load a boolean config.
Default: False.
"""
try:
if boolean_config:
cfg = parser.getboolean(self.CONFIG_SECTION, cfg_label)
else:
cfg = parser.get(self.CONFIG_SECTION, cfg_label)
if color_config:
if cfg == 'none':
cfg = None
# Check if the user input a valid color.
# If invalid, this will throw a TypeError
click.style('', fg=cfg)
except (TypeError, configparser.NoOptionError):
return default
return cfg
def load_configs(self, config_funcs):
"""Load the specified config from ~/.gitsomeconfig.
:type foo: list
:param foo: The config methods to run.
"""
config_file_path = self.get_github_config_path(self.CONFIG)
parser = configparser.RawConfigParser()
try:
with open(config_file_path) as config_file:
try:
parser.read_file(config_file)
except AttributeError:
parser.readfp(config_file)
for config_func in config_funcs:
config_func(parser)
except IOError:
# There might not be a cache yet, just silently return.
return None
def load_config_colors(self, parser):
"""Load the color config from ~/.gitsomeconfig.
:type parser: :class:`ConfigParser.RawConfigParser`
:param parser: An instance of `ConfigParser.RawConfigParser`.
"""
self.load_colors(parser)
def load_colors(self, parser):
"""Load all colors from ~/.gitsomeconfig.
:type parser: :class:`ConfigParser.RawConfigParser`
:param parser: An instance of `ConfigParser.RawConfigParser`.
"""
self.clr_primary = self.load_config(
parser=parser,
cfg_label=self.CONFIG_CLR_PRIMARY,
default=self.clr_primary,
color_config=True)
self.clr_secondary = self.load_config(
parser=parser,
cfg_label=self.CONFIG_CLR_SECONDARY,
default=self.clr_secondary,
color_config=True)
self.clr_tertiary = self.load_config(
parser=parser,
cfg_label=self.CONFIG_CLR_TERTIARY,
default=self.clr_tertiary,
color_config=True)
self.clr_quaternary = self.load_config(
parser=parser,
cfg_label=self.CONFIG_CLR_QUATERNARY,
default=self.clr_quaternary,
color_config=True)
self.clr_bold = self.load_config(
parser=parser,
cfg_label=self.CONFIG_CLR_BOLD,
default=self.clr_bold,
color_config=True)
self.clr_code = self.load_config(
parser=parser,
cfg_label=self.CONFIG_CLR_CODE,
default=self.clr_code,
color_config=True)
self.clr_code = self.load_config(
parser=parser,
cfg_label=self.CONFIG_CLR_ERROR,
default=self.clr_code,
color_config=True)
self.clr_header = self.load_config(
parser=parser,
cfg_label=self.CONFIG_CLR_HEADER,
default=self.clr_header,
color_config=True)
self.clr_link = self.load_config(
parser=parser,
cfg_label=self.CONFIG_CLR_LINK,
default=self.clr_link,
color_config=True)
self.clr_list = self.load_config(
parser=parser,
cfg_label=self.CONFIG_CLR_LIST,
default=self.clr_list,
color_config=True)
self.clr_message = self.load_config(
parser=parser,
cfg_label=self.CONFIG_CLR_MESSAGE,
default=self.clr_message,
color_config=True)
self.clr_num_comments = self.load_config(
parser=parser,
cfg_label=self.CONFIG_CLR_NUM_COMMENTS,
default=self.clr_num_comments,
color_config=True)
self.clr_num_points = self.load_config(
parser=parser,
cfg_label=self.CONFIG_CLR_NUM_POINTS,
default=self.clr_num_points,
color_config=True)
self.clr_tag = self.load_config(
parser=parser,
cfg_label=self.CONFIG_CLR_TAG,
default=self.clr_tag,
color_config=True)
self.clr_time = self.load_config(
parser=parser,
cfg_label=self.CONFIG_CLR_TIME,
default=self.clr_time,
color_config=True)
self.clr_title = self.load_config(
parser=parser,
cfg_label=self.CONFIG_CLR_TITLE,
default=self.clr_title,
color_config=True)
self.clr_tooltip = self.load_config(
parser=parser,
cfg_label=self.CONFIG_CLR_TOOLTIP,
default=self.clr_tooltip,
color_config=True)
self.clr_user = self.load_config(
parser=parser,
cfg_label=self.CONFIG_CLR_USER,
default=self.clr_user,
color_config=True)
self.clr_view_link = self.load_config(
parser=parser,
cfg_label=self.CONFIG_CLR_VIEW_LINK,
default=self.clr_view_link,
color_config=True)
self.clr_view_index = self.load_config(
parser=parser,
cfg_label=self.CONFIG_CLR_VIEW_INDEX,
default=self.clr_view_index,
color_config=True)
def load_urls(self, view_in_browser):
"""Load the current set of urls from ~/.gitsomeconfigurl.
:type view_in_browser: bool
:param view_in_browser: Determines whether to view the urls in a
browser.
:rtype: list
:return: Collection of urls.
"""
config = self.get_github_config_path(self.CONFIG_URL)
parser = configparser.RawConfigParser()
with open(config) as config_file:
try:
parser.read_file(config_file)
except AttributeError:
parser.readfp(config_file)
urls = parser.get(self.CONFIG_URL_SECTION,
self.CONFIG_URL_LIST)
urls = urls.strip()
excludes = ['[', ']', "'"]
for exclude in excludes:
urls = urls.replace(exclude, '')
if not view_in_browser:
urls = urls.replace('https://github.com/', '')
return urls.split(', ')
def print_auth_error(self):
"""Print a message the authorization has failed."""
click.secho('Authentication error.', fg=self.clr_error)
click.secho(('Update your credentials in ~/.gitsomeconfig '
'or run:\n gh configure'),
fg=self.clr_message)
def prompt_news_feed(self):
"""Prompt the user to enter a news feed url."""
if click.confirm(('No feed url detected.\n Calling gh events without '
"an argument\n displays the logged in user's "
'news feed.\nDo you want gitsome to track your '
'news feed?'),
default=True):
click.secho(('Visit the following url while logged into GitHub:\n'
' https://github.com\n'
'Enter the url found under "Subscribe to your '
'news feed".'),
fg=self.clr_message)
self.user_feed = ''
while not self.user_feed:
self.user_feed = input('URL: ')
def request_two_factor_code(self):
"""Request two factor authentication code.
Callback if two factor authentication is requested.
:rtype: str
:return: The user input two factor authentication code.
"""
code = ''
while not code:
code = input('Enter 2FA code: ')
return code
def save_config(self):
"""Saves the config to ~/.gitsomeconfig."""
if self.check_auth():
config = self.get_github_config_path(self.CONFIG)
parser = configparser.RawConfigParser()
parser.add_section(self.CONFIG_SECTION)
parser.set(self.CONFIG_SECTION,
self.CONFIG_USER_LOGIN,
self.user_login)
if self.user_token is not None:
parser.set(self.CONFIG_SECTION,
self.CONFIG_USER_TOKEN,
self.user_token)
if self.user_feed is not None:
parser.set(self.CONFIG_SECTION,
self.CONFIG_USER_FEED,
self.user_feed)
if self.enable_avatar is not None:
parser.set(self.CONFIG_SECTION,
self.CONFIG_ENABLE_AVATAR,
self.enable_avatar)
if self.enterprise_url is not None:
parser.set(self.CONFIG_SECTION,
self.CONFIG_ENTERPRISE_URL,
self.enterprise_url)
if self.user_pass is not None:
parser.set(self.CONFIG_SECTION,
self.CONFIG_USER_PASS,
self.user_pass)
else:
parser.remove_option(self.CONFIG_SECTION,
self.CONFIG_USER_PASS)
parser.set(self.CONFIG_SECTION,
self.CONFIG_VERIFY_SSL,
self.verify_ssl)
parser.set(self.CONFIG_SECTION,
self.CONFIG_CLR_PRIMARY,
self.clr_primary)
parser.set(self.CONFIG_SECTION,
self.CONFIG_CLR_SECONDARY,
self.clr_secondary)
parser.set(self.CONFIG_SECTION,
self.CONFIG_CLR_TERTIARY,
self.clr_tertiary)
parser.set(self.CONFIG_SECTION,
self.CONFIG_CLR_QUATERNARY,
self.clr_quaternary)
parser.set(self.CONFIG_SECTION,
self.CONFIG_CLR_BOLD,
self.clr_bold)
parser.set(self.CONFIG_SECTION,
self.CONFIG_CLR_CODE,
self.clr_code)
parser.set(self.CONFIG_SECTION,
self.CONFIG_CLR_ERROR,
self.clr_error)
parser.set(self.CONFIG_SECTION,
self.CONFIG_CLR_HEADER,
self.clr_header)
parser.set(self.CONFIG_SECTION,
self.CONFIG_CLR_LINK,
self.clr_link)
parser.set(self.CONFIG_SECTION,
self.CONFIG_CLR_LIST,
self.clr_list)
parser.set(self.CONFIG_SECTION,
self.CONFIG_CLR_MESSAGE,
self.clr_message)
parser.set(self.CONFIG_SECTION,
self.CONFIG_CLR_NUM_COMMENTS,
self.clr_num_comments)
parser.set(self.CONFIG_SECTION,
self.CONFIG_CLR_NUM_POINTS,
self.clr_num_points)
parser.set
gitextract_f42mvrxs/
├── .gitignore
├── .gitsomeconfig
├── .gitsomeconfigurl
├── .travis.yml
├── CHANGELOG.md
├── CHANGELOG.rst
├── CHECKLIST.md
├── COMMANDS.md
├── CONTRIBUTING.md
├── Dockerfile
├── LICENSE.txt
├── PRIVACY.md
├── README.md
├── TOS.md
├── appveyor.yml
├── codecov.yml
├── gitsome/
│ ├── __init__.py
│ ├── compat.py
│ ├── completer.py
│ ├── completions.py
│ ├── completions_git.py
│ ├── config.py
│ ├── formatter.py
│ ├── github.py
│ ├── githubcli.py
│ ├── main.py
│ ├── main_cli.py
│ ├── rss_feed.py
│ ├── table.py
│ ├── utils.py
│ ├── view_entry.py
│ └── web_viewer.py
├── requirements-dev.txt
├── scripts/
│ ├── aws_complete.sh
│ ├── create_changelog.sh
│ ├── create_readme_rst.sh
│ ├── gh_complete.sh
│ ├── gitsome
│ ├── gitsome.bat
│ ├── run_code_checks.sh
│ ├── set_changelog_as_readme.sh
│ ├── set_changelog_as_readme_undo.sh
│ ├── update_docs.sh
│ ├── upload_pypi.sh
│ ├── xonsh
│ └── xonsh.bat
├── setup.py
├── tests/
│ ├── __init__.py
│ ├── compat.py
│ ├── data/
│ │ ├── __init__.py
│ │ ├── email.py
│ │ ├── emoji.py
│ │ ├── events.py
│ │ ├── gitignores.py
│ │ ├── issue.py
│ │ ├── license.py
│ │ ├── markdown.py
│ │ ├── thread.py
│ │ ├── trends.p
│ │ ├── trends.py
│ │ ├── user.py
│ │ ├── user_feed.p
│ │ ├── user_feed.py
│ │ └── user_public_feed.p
│ ├── mock_feed_parser.py
│ ├── mock_github_api.py
│ ├── mock_pretty_date_time.py
│ ├── run_tests.py
│ ├── test_completer.py
│ ├── test_config.py
│ ├── test_github.py
│ ├── test_github_cli.py
│ └── test_web_viewer.py
├── tox.ini
└── xonsh/
├── __init__.py
├── __main__.py
├── aliases.py
├── ansi_colors.py
├── ast.py
├── base_shell.py
├── built_ins.py
├── codecache.py
├── color_tools.py
├── commands_cache.py
├── completer.py
├── completers/
│ ├── __init__.py
│ ├── _aliases.py
│ ├── base.py
│ ├── bash.py
│ ├── bash_completion.py
│ ├── commands.py
│ ├── completer.py
│ ├── dirs.py
│ ├── init.py
│ ├── man.py
│ ├── path.py
│ ├── pip.py
│ ├── python.py
│ ├── tools.py
│ └── xompletions.py
├── contexts.py
├── data/
│ └── data.txt
├── diff_history.py
├── dirstack.py
├── dumb_shell.py
├── environ.py
├── events.py
├── execer.py
├── foreign_shells.py
├── fs.py
├── history/
│ ├── __init__.py
│ ├── base.py
│ ├── dummy.py
│ ├── json.py
│ ├── main.py
│ └── sqlite.py
├── imphooks.py
├── inspectors.py
├── jobs.py
├── jsonutils.py
├── jupyter_kernel.py
├── jupyter_shell.py
├── lazyasd.py
├── lazyimps.py
├── lazyjson.py
├── lexer.py
├── macutils.py
├── main.py
├── openpy.py
├── parser.py
├── parsers/
│ ├── __init__.py
│ ├── base.py
│ ├── context_check.py
│ ├── v34.py
│ ├── v35.py
│ └── v36.py
├── platform.py
├── ply/
│ ├── .gitignore
│ ├── .travis.yml
│ ├── CHANGES
│ ├── CONTRIBUTING.md
│ ├── Makefile
│ ├── README.md
│ ├── __init__.py
│ ├── doc/
│ │ ├── internal.html
│ │ ├── makedoc.py
│ │ └── ply.html
│ ├── example/
│ │ ├── BASIC/
│ │ │ ├── README
│ │ │ ├── basic.py
│ │ │ ├── basiclex.py
│ │ │ ├── basiclog.py
│ │ │ ├── basinterp.py
│ │ │ ├── basparse.py
│ │ │ ├── dim.bas
│ │ │ ├── func.bas
│ │ │ ├── gcd.bas
│ │ │ ├── gosub.bas
│ │ │ ├── hello.bas
│ │ │ ├── linear.bas
│ │ │ ├── maxsin.bas
│ │ │ ├── powers.bas
│ │ │ ├── rand.bas
│ │ │ ├── sales.bas
│ │ │ ├── sears.bas
│ │ │ ├── sqrt1.bas
│ │ │ └── sqrt2.bas
│ │ ├── GardenSnake/
│ │ │ ├── GardenSnake.py
│ │ │ └── README
│ │ ├── README
│ │ ├── ansic/
│ │ │ ├── README
│ │ │ ├── clex.py
│ │ │ └── cparse.py
│ │ ├── calc/
│ │ │ └── calc.py
│ │ ├── calcdebug/
│ │ │ └── calc.py
│ │ ├── calceof/
│ │ │ └── calc.py
│ │ ├── classcalc/
│ │ │ └── calc.py
│ │ ├── cleanup.sh
│ │ ├── closurecalc/
│ │ │ └── calc.py
│ │ ├── hedit/
│ │ │ └── hedit.py
│ │ ├── newclasscalc/
│ │ │ └── calc.py
│ │ ├── optcalc/
│ │ │ ├── README
│ │ │ └── calc.py
│ │ ├── unicalc/
│ │ │ └── calc.py
│ │ └── yply/
│ │ ├── README
│ │ ├── ylex.py
│ │ ├── yparse.py
│ │ └── yply.py
│ ├── ply/
│ │ ├── __init__.py
│ │ ├── cpp.py
│ │ ├── ctokens.py
│ │ ├── lex.py
│ │ ├── yacc.py
│ │ └── ygen.py
│ ├── setup.md
│ └── test/
│ ├── README
│ ├── calclex.py
│ ├── cleanup.sh
│ ├── lex_closure.py
│ ├── lex_doc1.py
│ ├── lex_dup1.py
│ ├── lex_dup2.py
│ ├── lex_dup3.py
│ ├── lex_empty.py
│ ├── lex_error1.py
│ ├── lex_error2.py
│ ├── lex_error3.py
│ ├── lex_error4.py
│ ├── lex_hedit.py
│ ├── lex_ignore.py
│ ├── lex_ignore2.py
│ ├── lex_literal1.py
│ ├── lex_literal2.py
│ ├── lex_literal3.py
│ ├── lex_many_tokens.py
│ ├── lex_module.py
│ ├── lex_module_import.py
│ ├── lex_object.py
│ ├── lex_opt_alias.py
│ ├── lex_optimize.py
│ ├── lex_optimize2.py
│ ├── lex_optimize3.py
│ ├── lex_optimize4.py
│ ├── lex_re1.py
│ ├── lex_re2.py
│ ├── lex_re3.py
│ ├── lex_rule1.py
│ ├── lex_rule2.py
│ ├── lex_rule3.py
│ ├── lex_state1.py
│ ├── lex_state2.py
│ ├── lex_state3.py
│ ├── lex_state4.py
│ ├── lex_state5.py
│ ├── lex_state_noerror.py
│ ├── lex_state_norule.py
│ ├── lex_state_try.py
│ ├── lex_token1.py
│ ├── lex_token2.py
│ ├── lex_token3.py
│ ├── lex_token4.py
│ ├── lex_token5.py
│ ├── lex_token_dup.py
│ ├── pkg_test1/
│ │ ├── __init__.py
│ │ └── parsing/
│ │ ├── __init__.py
│ │ ├── calclex.py
│ │ └── calcparse.py
│ ├── pkg_test2/
│ │ ├── __init__.py
│ │ └── parsing/
│ │ ├── __init__.py
│ │ ├── calclex.py
│ │ └── calcparse.py
│ ├── pkg_test3/
│ │ ├── __init__.py
│ │ ├── generated/
│ │ │ └── __init__.py
│ │ └── parsing/
│ │ ├── __init__.py
│ │ ├── calclex.py
│ │ └── calcparse.py
│ ├── pkg_test4/
│ │ ├── __init__.py
│ │ └── parsing/
│ │ ├── __init__.py
│ │ ├── calclex.py
│ │ └── calcparse.py
│ ├── pkg_test5/
│ │ ├── __init__.py
│ │ └── parsing/
│ │ ├── __init__.py
│ │ ├── calclex.py
│ │ └── calcparse.py
│ ├── pkg_test6/
│ │ ├── __init__.py
│ │ └── parsing/
│ │ ├── __init__.py
│ │ ├── calclex.py
│ │ ├── calcparse.py
│ │ ├── expression.py
│ │ └── statement.py
│ ├── test_cpp_nonascii.c
│ ├── testcpp.py
│ ├── testlex.py
│ ├── testyacc.py
│ ├── yacc_badargs.py
│ ├── yacc_badid.py
│ ├── yacc_badprec.py
│ ├── yacc_badprec2.py
│ ├── yacc_badprec3.py
│ ├── yacc_badrule.py
│ ├── yacc_badtok.py
│ ├── yacc_dup.py
│ ├── yacc_error1.py
│ ├── yacc_error2.py
│ ├── yacc_error3.py
│ ├── yacc_error4.py
│ ├── yacc_error5.py
│ ├── yacc_error6.py
│ ├── yacc_error7.py
│ ├── yacc_inf.py
│ ├── yacc_literal.py
│ ├── yacc_misplaced.py
│ ├── yacc_missing1.py
│ ├── yacc_nested.py
│ ├── yacc_nodoc.py
│ ├── yacc_noerror.py
│ ├── yacc_nop.py
│ ├── yacc_notfunc.py
│ ├── yacc_notok.py
│ ├── yacc_prec1.py
│ ├── yacc_rr.py
│ ├── yacc_rr_unused.py
│ ├── yacc_simple.py
│ ├── yacc_sr.py
│ ├── yacc_term1.py
│ ├── yacc_unicode_literals.py
│ ├── yacc_unused.py
│ ├── yacc_unused_rule.py
│ ├── yacc_uprec.py
│ └── yacc_uprec2.py
├── pretty.py
├── proc.py
├── prompt/
│ ├── __init__.py
│ ├── base.py
│ ├── cwd.py
│ ├── env.py
│ ├── gitstatus.py
│ ├── job.py
│ └── vc.py
├── ptk/
│ ├── __init__.py
│ ├── completer.py
│ ├── history.py
│ ├── key_bindings.py
│ ├── shell.py
│ └── shortcuts.py
├── ptk2/
│ ├── __init__.py
│ ├── completer.py
│ ├── history.py
│ ├── key_bindings.py
│ └── shell.py
├── pyghooks.py
├── pygments_cache.py
├── pytest_plugin.py
├── readline_shell.py
├── replay.py
├── shell.py
├── style_tools.py
├── timings.py
├── tokenize.py
├── tools.py
├── tracer.py
├── winutils.py
├── wizard.py
├── xonfig.py
├── xonshrc
├── xontribs.json
├── xontribs.py
└── xoreutils/
├── __init__.py
├── _which.py
├── cat.py
├── echo.py
├── pwd.py
├── tee.py
├── tty.py
├── uptime.py
├── util.py
├── which.py
└── yes.py
Showing preview only (267K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (3765 symbols across 239 files)
FILE: gitsome/completer.py
class CompleterGitsome (line 26) | class CompleterGitsome(Completer):
method __init__ (line 37) | def __init__(self):
method build_completions_with_meta (line 41) | def build_completions_with_meta(self, line, prefix, completions):
method completing_command (line 73) | def completing_command(self, words, word_before_cursor):
method completing_subcommand (line 91) | def completing_subcommand(self, words, word_before_cursor):
method completing_arg (line 110) | def completing_arg(self, words, word_before_cursor):
method completing_subcommand_option (line 129) | def completing_subcommand_option(self, words, word_before_cursor):
method completing_subcommand_option_util (line 150) | def completing_subcommand_option_util(self, option, words):
method arg_completions (line 171) | def arg_completions(self, words, word_before_cursor):
method get_completions (line 195) | def get_completions(self, document, _):
FILE: gitsome/completions.py
function build_meta_lookups (line 320) | def build_meta_lookups():
FILE: gitsome/config.py
class Config (line 30) | class Config(object):
method __init__ (line 141) | def __init__(self):
method _init_colors (line 159) | def _init_colors(self):
method authenticate_cached_credentials (line 182) | def authenticate_cached_credentials(self, config, parser,
method authenticate (line 246) | def authenticate(self, enterprise=False,
method check_auth (line 342) | def check_auth(self):
method get_github_config_path (line 374) | def get_github_config_path(self, config_file_name):
method load_config (line 389) | def load_config(self, parser, cfg_label, default=None,
method load_configs (line 426) | def load_configs(self, config_funcs):
method load_config_colors (line 446) | def load_config_colors(self, parser):
method load_colors (line 454) | def load_colors(self, parser):
method load_urls (line 561) | def load_urls(self, view_in_browser):
method print_auth_error (line 588) | def print_auth_error(self):
method prompt_news_feed (line 595) | def prompt_news_feed(self):
method request_two_factor_code (line 611) | def request_two_factor_code(self):
method save_config (line 624) | def save_config(self):
method save_urls (line 722) | def save_urls(self):
method show_bash_completions_info (line 734) | def show_bash_completions_info(self):
FILE: gitsome/formatter.py
class Formatter (line 25) | class Formatter(object):
method __init__ (line 42) | def __init__(self, config):
method _format_time (line 89) | def _format_time(self, event):
method _format_issue_comment (line 100) | def _format_issue_comment(self, event, key):
method _format_indented_message (line 111) | def _format_indented_message(self, message, newline=True,
method _format_sha (line 144) | def _format_sha(self, sha):
method _format_commit_comment_event (line 152) | def _format_commit_comment_event(self, event):
method _format_create_delete_event (line 183) | def _format_create_delete_event(self, event):
method _format_fork_event (line 208) | def _format_fork_event(self, event):
method _format_issue_commment_event (line 221) | def _format_issue_commment_event(self, event):
method _format_issues_event (line 237) | def _format_issues_event(self, event):
method _format_pull_request_event (line 251) | def _format_pull_request_event(self, event):
method _format_push_event (line 265) | def _format_push_event(self, event):
method _format_release_event (line 286) | def _format_release_event(self, event):
method _format_general_event (line 302) | def _format_general_event(self, event):
method format_email (line 315) | def format_email(self, view_entry):
method format_emoji (line 335) | def format_emoji(self, view_entry):
method format_event (line 348) | def format_event(self, view_entry):
method format_gitignore_template_name (line 362) | def format_gitignore_template_name(self, view_entry):
method format_feed_entry (line 376) | def format_feed_entry(self, view_entry):
method format_license_name (line 416) | def format_license_name(self, view_entry):
method format_user (line 432) | def format_user(self, view_entry):
method format_issues_url_from_issue (line 445) | def format_issues_url_from_issue(self, issue):
method format_issues_url_from_thread (line 457) | def format_issues_url_from_thread(self, thread):
method format_index_title (line 473) | def format_index_title(self, index, title):
method format_issue (line 491) | def format_issue(self, view_entry):
method format_repo (line 526) | def format_repo(self, view_entry):
method format_thread (line 551) | def format_thread(self, view_entry):
method format_trending_entry (line 577) | def format_trending_entry(self, view_entry):
method format_user_repo (line 616) | def format_user_repo(self, user_repo_tuple):
method strip_line_breaks (line 636) | def strip_line_breaks(self, text):
FILE: gitsome/github.py
class GitHub (line 41) | class GitHub(object):
method __init__ (line 66) | def __init__(self):
method base_url (line 77) | def base_url(self):
method add_base_url (line 80) | def add_base_url(self, url):
method authenticate (line 90) | def authenticate(func):
method avatar (line 117) | def avatar(self, url, text_avatar):
method avatar_setup (line 151) | def avatar_setup(self, url, text_avatar):
method configure (line 177) | def configure(self, enterprise):
method create_comment (line 195) | def create_comment(self, user_repo_number, text):
method create_issue (line 222) | def create_issue(self, user_repo, issue_title, issue_desc=''):
method create_repo (line 252) | def create_repo(self, repo_name, repo_desc='', private=False):
method emails (line 276) | def emails(self):
method emojis (line 285) | def emojis(self, pager=False):
method feed (line 299) | def feed(self, user_or_repo='', private=False, pager=False):
method followers (line 346) | def followers(self, user, pager=False):
method following (line 366) | def following(self, user, pager=False):
method gitignore_template (line 386) | def gitignore_template(self, language):
method gitignore_templates (line 402) | def gitignore_templates(self, pager=False):
method issue (line 422) | def issue(self, user_repo_number):
method issues (line 440) | def issues(self, issues_list, limit=1000, pager=False, sort=True):
method issues_setup (line 475) | def issues_setup(self, issue_filter='subscribed', issue_state='open',
method license (line 498) | def license(self, license_name):
method licenses (line 514) | def licenses(self):
method notifications (line 529) | def notifications(self, limit=1000, pager=False):
method octocat (line 550) | def octocat(self, say):
method pull_requests (line 562) | def pull_requests(self, limit=1000, pager=False):
method rate_limit (line 584) | def rate_limit(self):
method repositories (line 594) | def repositories(self, repos, limit=1000, pager=False,
method repositories_setup (line 645) | def repositories_setup(self, repo_filter, limit=1000, pager=False):
method repository (line 666) | def repository(self, user_repo):
method search_issues (line 681) | def search_issues(self, query, limit=1000, pager=False):
method search_repositories (line 703) | def search_repositories(self, query, sort, limit=1000, pager=False):
method starred (line 729) | def starred(self, repo_filter, limit=1000, pager=False):
method trending (line 749) | def trending(self, language, weekly, monthly,
method user (line 812) | def user(self, user_id, browser=False, text_avatar=False,
method user_me (line 880) | def user_me(self, browser, text_avatar, limit=1000, pager=False):
method view (line 903) | def view(self, index, view_in_browser=False):
FILE: gitsome/githubcli.py
class GitHubCli (line 28) | class GitHubCli(object):
method cli (line 33) | def cli(ctx):
method configure (line 48) | def configure(github, enterprise):
method create_comment (line 70) | def create_comment(github, user_repo_number, text):
method create_issue (line 96) | def create_issue(github, user_repo, issue_title, issue_desc):
method create_repo (line 126) | def create_repo(github, repo_name, repo_desc, private):
method emails (line 155) | def emails(github):
method emojis (line 169) | def emojis(github, pager):
method feed (line 192) | def feed(github, user_or_repo, private, pager):
method followers (line 232) | def followers(github, user, pager):
method following (line 260) | def following(github, user, pager):
method gitignore_template (line 287) | def gitignore_template(github, language):
method gitignore_templates (line 308) | def gitignore_templates(github, pager):
method issue (line 331) | def issue(github, user_repo_number):
method issues (line 354) | def issues(github, issue_filter, issue_state, limit, pager):
method license (line 389) | def license(github, license_name):
method licenses (line 409) | def licenses(github):
method me (line 426) | def me(github, browser, text_avatar, limit, pager):
method notifications (line 465) | def notifications(github, limit, pager):
method octocat (line 491) | def octocat(github, say):
method pull_request (line 513) | def pull_request(github, user_repo_number):
method pull_requests (line 534) | def pull_requests(github, limit, pager):
method rate_limit (line 559) | def rate_limit(github):
method repositories (line 578) | def repositories(github, repo_filter, limit, pager):
method repository (line 610) | def repository(github, user_repo):
method search_issues (line 632) | def search_issues(github, query, limit, pager):
method search_repositories (line 706) | def search_repositories(github, query, sort, limit, pager):
method starred (line 763) | def starred(github, repo_filter, limit, pager):
method trending (line 799) | def trending(github, language, weekly, monthly, devs, browser, pager):
method user (line 848) | def user(github, user_id, browser, text_avatar, limit, pager):
method view (line 891) | def view(github, index, browser):
FILE: gitsome/main.py
function cli (line 23) | def cli():
FILE: gitsome/main_cli.py
function cli (line 23) | def cli():
FILE: gitsome/table.py
class Table (line 28) | class Table(object):
method __init__ (line 35) | def __init__(self, config):
method build_table (line 38) | def build_table(self, view_entries, limit, pager, format_method,
method build_table_setup (line 100) | def build_table_setup(self, items, format_method,
method build_table_setup_feed (line 130) | def build_table_setup_feed(self, items, format_method, pager):
method build_table_setup_user (line 149) | def build_table_setup_user(self, items, format_method,
method build_table_setup_trending (line 180) | def build_table_setup_trending(self, items, format_method,
method build_table_urls (line 212) | def build_table_urls(self, view_entries):
method create_tip (line 222) | def create_tip(self, max_index):
FILE: gitsome/utils.py
class TextUtils (line 28) | class TextUtils(object):
method find_matches (line 31) | def find_matches(self, word, collection, fuzzy):
method get_tokens (line 54) | def get_tokens(self, text):
method _last_token (line 69) | def _last_token(self, text):
method _fuzzy_finder (line 86) | def _fuzzy_finder(self, text, collection, case_sensitive=True):
method _find_collection_matches (line 122) | def _find_collection_matches(self, word, collection, fuzzy):
method _shlex_split (line 158) | def _shlex_split(self, text):
method _safe_split (line 171) | def _safe_split(self, text):
method sanitize_if_none (line 188) | def sanitize_if_none(self, text):
FILE: gitsome/view_entry.py
class ViewEntry (line 20) | class ViewEntry(object):
method __init__ (line 42) | def __init__(self, item, url=None, index=-1,
method __lt__ (line 53) | def __lt__(self, other):
FILE: gitsome/web_viewer.py
class WebViewer (line 28) | class WebViewer(object):
method __init__ (line 41) | def __init__(self, config):
method _init_html_to_text (line 50) | def _init_html_to_text(self):
method format_markdown (line 61) | def format_markdown(self, text):
method generate_url_contents (line 100) | def generate_url_contents(self, url):
method view_url (line 128) | def view_url(self, url):
FILE: setup.py
function clean_tables (line 25) | def clean_tables():
function build_tables (line 32) | def build_tables():
class xinstall (line 41) | class xinstall(install):
method run (line 42) | def run(self):
class xsdist (line 48) | class xsdist(sdist):
method make_release_tree (line 49) | def make_release_tree(self, basedir, files):
class xdevelop (line 56) | class xdevelop(develop):
method run (line 57) | def run(self):
function main (line 63) | def main():
FILE: tests/mock_feed_parser.py
class MockFeedParser (line 22) | class MockFeedParser(object):
method parse (line 24) | def parse(self, url):
FILE: tests/mock_github_api.py
class MockEmail (line 27) | class MockEmail(object):
method __init__ (line 29) | def __init__(self, email, primary=False, verified=False):
class MockUser (line 35) | class MockUser(object):
method __init__ (line 37) | def __init__(self, login, user_type='User'):
method events (line 50) | def events(self, public):
method raise_mock_unprocessableentity (line 101) | def raise_mock_unprocessableentity(self):
method create_repo (line 107) | def create_repo(self, name, desc='', private=False):
class MockRepo (line 115) | class MockRepo(object):
method __init__ (line 117) | def __init__(self, user, full_name, description='', private=False):
method __lt__ (line 130) | def __lt__(self, other):
method gen_key (line 133) | def gen_key(self):
method create_issue (line 136) | def create_issue(self, issue_title, issue_desc=''):
method pull_requests (line 142) | def pull_requests(self):
class MockIssue (line 146) | class MockIssue(object):
method __init__ (line 148) | def __init__(self, number, repository, title, body=''):
method create_comment (line 161) | def create_comment(self, body):
class MockIssueComment (line 167) | class MockIssueComment(object):
method __init__ (line 169) | def __init__(self, body):
class MockRepoComment (line 173) | class MockRepoComment(object):
method __init__ (line 175) | def __init__(self):
class MockLicense (line 180) | class MockLicense(object):
method __init__ (line 182) | def __init__(self, key, name):
class MockThread (line 187) | class MockThread(object):
method __init__ (line 189) | def __init__(self, thread_type, title, unread):
class MockEvent (line 199) | class MockEvent(object):
method __init__ (line 201) | def __init__(self, event_type, payload=''):
class MockGitHubApi (line 212) | class MockGitHubApi(object):
method __init__ (line 214) | def __init__(self):
method _generate_mock_data (line 220) | def _generate_mock_data(self):
method create_issue (line 236) | def create_issue(self, user_login, repo_name, issue_title, issue_desc):
method create_repository (line 245) | def create_repository(self, repo_name, repo_desc='', private=False):
method emails (line 249) | def emails(self):
method emojis (line 253) | def emojis(self, pager=False):
method followers_of (line 262) | def followers_of(self, user_login):
method followed_by (line 269) | def followed_by(self, user_login):
method gitignore_template (line 272) | def gitignore_template(self, language):
method gitignore_templates (line 278) | def gitignore_templates(self):
method issue (line 287) | def issue(self, user_login, repo_name, number):
method issues (line 295) | def issues(self, issue_filter='subscribed', issue_state='open'):
method license (line 302) | def license(self, license):
method licenses (line 310) | def licenses(self):
method notifications (line 319) | def notifications(self, all=True, participating=False):
method octocat (line 326) | def octocat(self, say):
method pull_request (line 329) | def pull_request(self, owner, repository, number):
method search_issues (line 333) | def search_issues(self, query):
method search_repositories (line 336) | def search_repositories(self, query, sort):
method repositories (line 339) | def repositories(self, user_id=None):
method user (line 347) | def user(self, user_id):
FILE: tests/mock_pretty_date_time.py
function pretty_date_time (line 20) | def pretty_date_time(date_time):
FILE: tests/test_completer.py
class CompleterTest (line 27) | class CompleterTest(unittest.TestCase):
method setUp (line 29) | def setUp(self):
method create_completer_event (line 33) | def create_completer_event(self):
method _get_completions (line 36) | def _get_completions(self, command):
method verify_completions (line 43) | def verify_completions(self, commands, expected):
method test_blank (line 60) | def test_blank(self):
method test_no_completions (line 66) | def test_no_completions(self):
method test_command (line 72) | def test_command(self):
method test_subcommand (line 77) | def test_subcommand(self):
method test_args (line 97) | def test_args(self):
method test_no_args_with_options (line 100) | def test_no_args_with_options(self):
method test_options (line 103) | def test_options(self):
method test_multiple_options (line 107) | def test_multiple_options(self):
method test_fuzzy (line 111) | def test_fuzzy(self):
method test_build_completions_with_meta (line 115) | def test_build_completions_with_meta(self):
FILE: tests/test_config.py
class ConfigTest (line 28) | class ConfigTest(unittest.TestCase):
method setUp (line 30) | def setUp(self):
method verify_login_token (line 37) | def verify_login_token(self, username=None, password=None,
method verify_login_pass (line 46) | def verify_login_pass(self, username=None, password=None,
method verify_login_token_url_enterprise (line 56) | def verify_login_token_url_enterprise(self, username=None, password=None,
method verify_login_token_url_no_verify_enterprise (line 66) | def verify_login_token_url_no_verify_enterprise(self, username=None,
method verify_login_pass_url_enterprise (line 77) | def verify_login_pass_url_enterprise(self, username=None, password=None,
method test_config (line 87) | def test_config(self):
method test_authenticate_cached_credentials_token (line 93) | def test_authenticate_cached_credentials_token(self):
method test_authenticate_cached_credentials_pass (line 108) | def test_authenticate_cached_credentials_pass(self):
method test_authenticate_cached_credentials_token_enterprise (line 122) | def test_authenticate_cached_credentials_token_enterprise(self):
method test_authenticate_cached_credentials_pass_enterprise (line 142) | def test_authenticate_cached_credentials_pass_enterprise(self):
method test_authenticate_token (line 164) | def test_authenticate_token(self, mock_auth, mock_click_secho):
method test_authenticate_pass (line 176) | def test_authenticate_pass(self, mock_auth, mock_click_secho):
method test_authenticate_enterprise_token (line 189) | def test_authenticate_enterprise_token(self, mock_auth, mock_click_sec...
method test_authenticate_enterprise_pass (line 203) | def test_authenticate_enterprise_pass(self, mock_auth, mock_click_secho):
method test_check_auth_error (line 215) | def test_check_auth_error(self, mock_click_secho):
method test_load_urls (line 221) | def test_load_urls(self):
method test_request_two_factor_code (line 225) | def test_request_two_factor_code(self):
method test_prompt_news_feed (line 230) | def test_prompt_news_feed(self, mock_click_secho):
FILE: tests/test_github.py
class GitHubTest (line 39) | class GitHubTest(unittest.TestCase):
method setUp (line 41) | def setUp(self):
method test_avatar_no_pil (line 47) | def test_avatar_no_pil(self):
method test_create_comment (line 53) | def test_create_comment(self, mock_click_secho):
method test_create_comment_invalid_args (line 60) | def test_create_comment_invalid_args(self, mock_click_secho):
method test_create_issue (line 71) | def test_create_issue(self, mock_click_secho):
method test_create_issue_no_desc (line 78) | def test_create_issue_no_desc(self, mock_click_secho):
method test_create_issue_invalid_args (line 85) | def test_create_issue_invalid_args(self, mock_click_secho):
method test_create_repo (line 96) | def test_create_repo(self, mock_click_secho):
method test_create_repo_no_desc (line 103) | def test_create_repo_no_desc(self, mock_click_secho):
method test_create_repo_invalid_args (line 110) | def test_create_repo_invalid_args(self, mock_click_secho):
method test_emails (line 117) | def test_emails(self, mock_click_secho):
method test_feed_config (line 123) | def test_feed_config(self, mock_config_prompt_news_feed, mock_click_se...
method test_feed (line 128) | def test_feed(self, mock_click_secho):
method test_feed_user (line 135) | def test_feed_user(self, mock_config, mock_click_secho):
method test_emojis (line 140) | def test_emojis(self, mock_click_secho):
method test_followers (line 145) | def test_followers(self, mock_click_secho):
method test_following (line 150) | def test_following(self, mock_click_secho):
method test_gitignore_template (line 155) | def test_gitignore_template(self, mock_click_secho):
method test_gitignore_template_invalid (line 162) | def test_gitignore_template_invalid(self, mock_click_secho):
method test_gitignore_templates (line 171) | def test_gitignore_templates(self, mock_click_secho):
method test_issue (line 178) | def test_issue(self, mock_view_url):
method test_issue_invalid_args (line 184) | def test_issue_invalid_args(self, mock_click_secho):
method test_issues_setup (line 191) | def test_issues_setup(self, mock_click_secho):
method test_license (line 196) | def test_license(self, mock_click_secho):
method test_license_invalid (line 203) | def test_license_invalid(self, mock_click_secho):
method test_licenses (line 212) | def test_licenses(self, mock_click_secho):
method test_notifications (line 219) | def test_notifications(self, mock_click_secho):
method test_octocat (line 224) | def test_octocat(self, mock_click_secho):
method test_pull_requests (line 231) | def test_pull_requests(self, mock_click_secho):
method test_rate_limit (line 236) | def test_rate_limit(self, mock_click_secho):
method test_repository (line 243) | def test_repository(self, mock_view_url):
method test_repository_invalid (line 249) | def test_repository_invalid(self, mock_click_secho):
method test_search_issues (line 257) | def test_search_issues(self, mock_github_issues, mock_click_secho):
method test_search_repos (line 264) | def test_search_repos(self, mock_github_repositories, mock_click_secho):
method test_trending (line 270) | def test_trending(self, mock_click_secho):
method test_user (line 275) | def test_user(self, mock_click_secho):
method test_user_invalid (line 282) | def test_user_invalid(self, mock_click_secho):
method test_user_browser (line 290) | def test_user_browser(self, mock_webbrowser_open, mock_click_secho):
method test_view_browser (line 297) | def test_view_browser(self, mock_webbrowser_open, mock_click_secho):
method test_view_issue (line 305) | def test_view_issue(self, mock_github_issue, mock_click_secho):
method test_view_repo (line 312) | def test_view_repo(self, mock_github_repository, mock_click_secho):
method test_view_user (line 319) | def test_view_user(self, mock_view_url, mock_click_secho):
method test_base_url (line 324) | def test_base_url(self):
method test_add_base_url (line 330) | def test_add_base_url(self):
FILE: tests/test_github_cli.py
class GitHubCliTest (line 27) | class GitHubCliTest(unittest.TestCase):
method setUp (line 29) | def setUp(self):
method test_cli (line 34) | def test_cli(self):
method test_configure (line 39) | def test_configure(self, mock_gh_call):
method test_create_comment (line 45) | def test_create_comment(self, mock_gh_call):
method test_create_issue (line 53) | def test_create_issue(self, mock_gh_call):
method test_create_repo (line 62) | def test_create_repo(self, mock_gh_call):
method test_emails (line 71) | def test_emails(self, mock_gh_call):
method test_emojis (line 78) | def test_emojis(self, mock_gh_call):
method test_feed (line 86) | def test_feed(self, mock_gh_call):
method test_followers (line 94) | def test_followers(self, mock_gh_call):
method test_following (line 102) | def test_following(self, mock_gh_call):
method test_gitignore_template (line 110) | def test_gitignore_template(self, mock_gh_call):
method test_gitignore_templates (line 117) | def test_gitignore_templates(self, mock_gh_call):
method test_issue (line 125) | def test_issue(self, mock_gh_call):
method test_issues (line 132) | def test_issues(self, mock_gh_call):
method test_license (line 143) | def test_license(self, mock_gh_call):
method test_licenses (line 150) | def test_licenses(self, mock_gh_call):
method test_me (line 157) | def test_me(self, mock_gh_call):
method test_notifications (line 167) | def test_notifications(self, mock_gh_call):
method test_octocat (line 176) | def test_octocat(self, mock_gh_call):
method test_pull_request (line 183) | def test_pull_request(self, mock_gh_call):
method test_pull_requests (line 190) | def test_pull_requests(self, mock_gh_call):
method test_rate_limit (line 199) | def test_rate_limit(self, mock_gh_call):
method test_repository (line 206) | def test_repository(self, mock_gh_call):
method test_repositories (line 213) | def test_repositories(self, mock_gh_call):
method test_search_issues (line 222) | def test_search_issues(self, mock_gh_call):
method test_search_repositories (line 231) | def test_search_repositories(self, mock_gh_call):
method test_starred (line 241) | def test_starred(self, mock_gh_call):
method test_trending (line 250) | def test_trending(self, mock_gh_call):
method test_user (line 270) | def test_user(self, mock_gh_call):
method test_view (line 280) | def test_view(self, mock_gh_call):
FILE: tests/test_web_viewer.py
class WebViewerTest (line 26) | class WebViewerTest(unittest.TestCase):
method setUp (line 28) | def setUp(self):
method test_format_markdown (line 31) | def test_format_markdown(self):
method test_view_url (line 36) | def test_view_url(self, mock_click_echo_via_pager):
method test_view_url_ssl_error (line 43) | def test_view_url_ssl_error(self, mock_click_echo_via_pager):
FILE: xonsh/aliases.py
function SUB_EXEC_ALIAS_RE (line 46) | def SUB_EXEC_ALIAS_RE():
class Aliases (line 50) | class Aliases(cabc.MutableMapping):
method __init__ (line 53) | def __init__(self, *args, **kwargs):
method get (line 57) | def get(self, key, default=None):
method eval_alias (line 74) | def eval_alias(self, value, seen_tokens=frozenset(), acc_args=()):
method expand_alias (line 105) | def expand_alias(self, line):
method __getitem__ (line 120) | def __getitem__(self, key):
method __setitem__ (line 123) | def __setitem__(self, key, val):
method __delitem__ (line 139) | def __delitem__(self, key):
method update (line 142) | def update(self, *args, **kwargs):
method __iter__ (line 146) | def __iter__(self):
method __len__ (line 149) | def __len__(self):
method __str__ (line 152) | def __str__(self):
method __repr__ (line 155) | def __repr__(self):
method _repr_pretty_ (line 160) | def _repr_pretty_(self, p, cycle):
class ExecAlias (line 170) | class ExecAlias:
method __init__ (line 173) | def __init__(self, src, filename="<exec-alias>"):
method __call__ (line 183) | def __call__(
method __repr__ (line 192) | def __repr__(self):
class PartialEvalAliasBase (line 196) | class PartialEvalAliasBase:
method __init__ (line 199) | def __init__(self, f, acc_args=()):
method __call__ (line 213) | def __call__(
method __repr__ (line 219) | def __repr__(self):
class PartialEvalAlias0 (line 225) | class PartialEvalAlias0(PartialEvalAliasBase):
method __call__ (line 226) | def __call__(
class PartialEvalAlias1 (line 237) | class PartialEvalAlias1(PartialEvalAliasBase):
method __call__ (line 238) | def __call__(
class PartialEvalAlias2 (line 245) | class PartialEvalAlias2(PartialEvalAliasBase):
method __call__ (line 246) | def __call__(
class PartialEvalAlias3 (line 253) | class PartialEvalAlias3(PartialEvalAliasBase):
method __call__ (line 254) | def __call__(
class PartialEvalAlias4 (line 261) | class PartialEvalAlias4(PartialEvalAliasBase):
method __call__ (line 262) | def __call__(
class PartialEvalAlias5 (line 269) | class PartialEvalAlias5(PartialEvalAliasBase):
method __call__ (line 270) | def __call__(
class PartialEvalAlias6 (line 277) | class PartialEvalAlias6(PartialEvalAliasBase):
method __call__ (line 278) | def __call__(
function partial_eval_alias (line 296) | def partial_eval_alias(f, acc_args=()):
function xonsh_exit (line 325) | def xonsh_exit(args, stdin=None):
function xonsh_reset (line 335) | def xonsh_reset(args, stdin=None):
function _SOURCE_FOREIGN_PARSER (line 341) | def _SOURCE_FOREIGN_PARSER():
function source_foreign (line 467) | def source_foreign(args, stdin=None, stdout=None, stderr=None):
function source_alias (line 539) | def source_alias(args, stdin=None):
function source_cmd (line 588) | def source_cmd(args, stdin=None):
function xexec (line 609) | def xexec(args, stdin=None):
class AWitchAWitch (line 647) | class AWitchAWitch(argparse.Action):
method __init__ (line 650) | def __init__(
method __call__ (line 657) | def __call__(self, parser, namespace, values, option_string=None):
function xonfig (line 664) | def xonfig(args, stdin=None):
function trace (line 672) | def trace(args, stdin=None, stdout=None, stderr=None, spec=None):
function showcmd (line 682) | def showcmd(args, stdin=None):
function detect_xpip_alias (line 702) | def detect_xpip_alias():
function make_default_aliases (line 727) | def make_default_aliases():
FILE: xonsh/ansi_colors.py
function ansi_partial_color_format (line 21) | def ansi_partial_color_format(template, style="default", cmap=None, hide...
function _ansi_partial_color_format_main (line 51) | def _ansi_partial_color_format_main(template, style="default", cmap=None...
function ansi_color_style_names (line 103) | def ansi_color_style_names():
function ansi_color_style (line 108) | def ansi_color_style(style="default"):
function ansi_reverse_style (line 119) | def ansi_reverse_style(style="default", return_style=False):
function ANSI_ESCAPE_CODE_RE (line 156) | def ANSI_ESCAPE_CODE_RE():
function ANSI_REVERSE_COLOR_NAME_TRANSLATIONS (line 161) | def ANSI_REVERSE_COLOR_NAME_TRANSLATIONS():
function ANSI_COLOR_NAME_SET_3INTS_RE (line 178) | def ANSI_COLOR_NAME_SET_3INTS_RE():
function ANSI_COLOR_NAME_SET_SHORT_RE (line 183) | def ANSI_COLOR_NAME_SET_SHORT_RE():
function _color_name_from_ints (line 187) | def _color_name_from_ints(ints, background=False, prefix=None):
function ansi_color_escape_code_to_name (line 198) | def ansi_color_escape_code_to_name(escape_code, style, reversed_style=No...
function _ansi_expand_style (line 279) | def _ansi_expand_style(cmap):
function _bw_style (line 296) | def _bw_style():
function _default_style (line 320) | def _default_style():
function _monokai_style (line 418) | def _monokai_style():
function _algol_style (line 447) | def _algol_style():
function _algol_nu_style (line 471) | def _algol_nu_style():
function _autumn_style (line 495) | def _autumn_style():
function _borland_style (line 519) | def _borland_style():
function _colorful_style (line 543) | def _colorful_style():
function _emacs_style (line 567) | def _emacs_style():
function _friendly_style (line 591) | def _friendly_style():
function _fruity_style (line 615) | def _fruity_style():
function _igor_style (line 639) | def _igor_style():
function _lovelace_style (line 663) | def _lovelace_style():
function _manni_style (line 687) | def _manni_style():
function _murphy_style (line 711) | def _murphy_style():
function _native_style (line 735) | def _native_style():
function _paraiso_dark_style (line 759) | def _paraiso_dark_style():
function _paraiso_light_style (line 783) | def _paraiso_light_style():
function _pastie_style (line 807) | def _pastie_style():
function _perldoc_style (line 831) | def _perldoc_style():
function _rrt_style (line 855) | def _rrt_style():
function _tango_style (line 879) | def _tango_style():
function _trac_style (line 903) | def _trac_style():
function _vim_style (line 927) | def _vim_style():
function _vs_style (line 951) | def _vs_style():
function _xcode_style (line 975) | def _xcode_style():
function make_ansi_style (line 1065) | def make_ansi_style(palette):
function ansi_style_by_name (line 1081) | def ansi_style_by_name(name):
FILE: xonsh/ast.py
function leftmostname (line 155) | def leftmostname(node):
function get_lineno (line 182) | def get_lineno(node, default=0):
function min_line (line 187) | def min_line(node):
function max_line (line 193) | def max_line(node):
function get_col (line 198) | def get_col(node, default=-1):
function min_col (line 203) | def min_col(node):
function max_col (line 208) | def max_col(node):
function node_len (line 218) | def node_len(node):
function get_id (line 230) | def get_id(node, default=None):
function gather_names (line 235) | def gather_names(node):
function get_id_ctx (line 242) | def get_id_ctx(node):
function gather_load_store_names (line 250) | def gather_load_store_names(node):
function has_elts (line 266) | def has_elts(x):
function load_attribute_chain (line 271) | def load_attribute_chain(name, lineno=None, col=None):
function xonsh_call (line 284) | def xonsh_call(name, args, lineno=None, col=None):
function isdescendable (line 299) | def isdescendable(node):
function isexpression (line 306) | def isexpression(node, ctx=None, *args, **kwargs):
class CtxAwareTransformer (line 326) | class CtxAwareTransformer(NodeTransformer):
method __init__ (line 333) | def __init__(self, parser):
method ctxvisit (line 349) | def ctxvisit(self, node, inp, ctx, mode="exec", filename=None, debug_l...
method ctxupdate (line 381) | def ctxupdate(self, iterable):
method ctxadd (line 385) | def ctxadd(self, value):
method ctxremove (line 389) | def ctxremove(self, value):
method try_subproc_toks (line 396) | def try_subproc_toks(self, node, strip_expr=False):
method is_in_scope (line 456) | def is_in_scope(self, node):
method visit_Expression (line 474) | def visit_Expression(self, node):
method visit_Expr (line 484) | def visit_Expr(self, node):
method visit_UnaryOp (line 501) | def visit_UnaryOp(self, node):
method visit_BoolOp (line 511) | def visit_BoolOp(self, node):
method visit_Assign (line 526) | def visit_Assign(self, node):
method visit_Import (line 545) | def visit_Import(self, node):
method visit_ImportFrom (line 554) | def visit_ImportFrom(self, node):
method visit_With (line 563) | def visit_With(self, node):
method visit_For (line 573) | def visit_For(self, node):
method visit_FunctionDef (line 580) | def visit_FunctionDef(self, node):
method visit_ClassDef (line 595) | def visit_ClassDef(self, node):
method visit_Delete (line 603) | def visit_Delete(self, node):
method visit_Try (line 611) | def visit_Try(self, node):
method visit_Global (line 619) | def visit_Global(self, node):
function pdump (line 626) | def pdump(s, **kwargs):
function pprint_ast (line 651) | def pprint_ast(s, *, sep=None, end=None, file=None, flush=False, **kwargs):
function _getblockattr (line 661) | def _getblockattr(name, lineno, col):
FILE: xonsh/base_shell.py
class _TeeStdBuf (line 40) | class _TeeStdBuf(io.RawIOBase):
method __init__ (line 45) | def __init__(
method fileno (line 76) | def fileno(self):
method seek (line 80) | def seek(self, offset, whence=io.SEEK_SET):
method truncate (line 85) | def truncate(self, size=None):
method readinto (line 90) | def readinto(self, b):
method write (line 96) | def write(self, b):
class _TeeStd (line 111) | class _TeeStd(io.TextIOBase):
method __init__ (line 114) | def __init__(self, name, mem, prestd="", poststd=""):
method encoding (line 151) | def encoding(self):
method errors (line 156) | def errors(self):
method newlines (line 161) | def newlines(self):
method _replace_std (line 165) | def _replace_std(self):
method __del__ (line 172) | def __del__(self):
method close (line 175) | def close(self):
method write (line 179) | def write(self, s):
method flush (line 191) | def flush(self):
method fileno (line 196) | def fileno(self):
method seek (line 200) | def seek(self, offset, whence=io.SEEK_SET):
method truncate (line 205) | def truncate(self, size=None):
method detach (line 210) | def detach(self):
method read (line 214) | def read(self, size=None):
method readline (line 223) | def readline(self, size=-1):
class Tee (line 233) | class Tee:
method __init__ (line 244) | def __init__(
method line_buffering (line 271) | def line_buffering(self):
method __del__ (line 274) | def __del__(self):
method close (line 278) | def close(self):
method getvalue (line 284) | def getvalue(self):
class BaseShell (line 294) | class BaseShell(object):
method __init__ (line 297) | def __init__(self, execer, ctx, **kwargs):
method styler (line 310) | def styler(self):
method styler (line 322) | def styler(self, value):
method styler (line 326) | def styler(self):
method emptyline (line 329) | def emptyline(self):
method singleline (line 334) | def singleline(self, **kwargs):
method precmd (line 339) | def precmd(self, line):
method default (line 343) | def default(self, line):
method _append_history (line 388) | def _append_history(self, tee_out=None, **info):
method _fix_cwd (line 413) | def _fix_cwd(self):
method push (line 445) | def push(self, line):
method compile (line 456) | def compile(self, src):
method reset_buffer (line 494) | def reset_buffer(self):
method settitle (line 500) | def settitle(self):
method prompt (line 526) | def prompt(self):
method format_color (line 545) | def format_color(self, string, hide=False, force_string=False, **kwargs):
method print_color (line 552) | def print_color(self, string, hide=False, **kwargs):
method color_style_names (line 572) | def color_style_names(self):
method color_style (line 576) | def color_style(self):
method restore_tty_sanity (line 580) | def restore_tty_sanity(self):
FILE: xonsh/built_ins.py
function AT_EXIT_SIGNALS (line 61) | def AT_EXIT_SIGNALS():
function resetting_signal_handle (line 74) | def resetting_signal_handle(sig, f):
function helper (line 89) | def helper(x, name=""):
function superhelper (line 95) | def superhelper(x, name=""):
function reglob (line 101) | def reglob(path, parts=None, i=None):
function path_literal (line 140) | def path_literal(s):
function regexsearch (line 145) | def regexsearch(s):
function globsearch (line 150) | def globsearch(s):
function pathsearch (line 163) | def pathsearch(func, s, pymode=False, pathobj=False):
function _is_binary (line 182) | def _is_binary(fname, limit=80):
function _un_shebang (line 195) | def _un_shebang(x):
function get_script_subproc_command (line 207) | def get_script_subproc_command(fname, args):
function _REDIR_REGEX (line 252) | def _REDIR_REGEX():
function _is_redirect (line 280) | def _is_redirect(x):
function safe_open (line 284) | def safe_open(fname, mode, buffering=-1):
function safe_close (line 297) | def safe_close(x):
function _parse_redirects (line 309) | def _parse_redirects(r, loc=None):
function _redirect_streams (line 333) | def _redirect_streams(r, loc=None):
function default_signal_pauser (line 362) | def default_signal_pauser(n, f):
function no_pg_xonsh_preexec_fn (line 367) | def no_pg_xonsh_preexec_fn():
class SubprocSpec (line 375) | class SubprocSpec:
method __init__ (line 382) | def __init__(
method __str__ (line 466) | def __str__(self):
method __repr__ (line 473) | def __repr__(self):
method stdin (line 485) | def stdin(self):
method stdin (line 489) | def stdin(self, value):
method stdout (line 501) | def stdout(self):
method stdout (line 505) | def stdout(self, value):
method stderr (line 517) | def stderr(self):
method stderr (line 521) | def stderr(self, value):
method run (line 536) | def run(self, *, pipeline_group=None):
method _run_binary (line 557) | def _run_binary(self, kwargs):
method prep_env (line 574) | def prep_env(self, kwargs):
method prep_preexec_fn (line 583) | def prep_preexec_fn(self, kwargs, pipeline_group=None):
method _fix_null_cmd_bytes (line 602) | def _fix_null_cmd_bytes(self):
method _cmd_event_name (line 610) | def _cmd_event_name(self):
method _pre_run_event_fire (line 618) | def _pre_run_event_fire(self, name):
method _post_run_event_fire (line 624) | def _post_run_event_fire(self, name, proc):
method build (line 635) | def build(kls, cmd, *, cls=subprocess.Popen, **kwargs):
method redirect_leading (line 655) | def redirect_leading(self):
method redirect_trailing (line 661) | def redirect_trailing(self):
method resolve_alias (line 676) | def resolve_alias(self):
method resolve_binary_loc (line 685) | def resolve_binary_loc(self):
method resolve_auto_cd (line 696) | def resolve_auto_cd(self):
method resolve_executable_commands (line 709) | def resolve_executable_commands(self):
method resolve_alias_cls (line 730) | def resolve_alias_cls(self):
method resolve_stack (line 744) | def resolve_stack(self):
function _safe_pipe_properties (line 762) | def _safe_pipe_properties(fd, use_tty=False):
function _update_last_spec (line 776) | def _update_last_spec(last):
function cmds_to_specs (line 853) | def cmds_to_specs(cmds, captured=False):
function _should_set_title (line 889) | def _should_set_title(captured=False):
function run_subproc (line 899) | def run_subproc(cmds, captured=False):
function subproc_captured_stdout (line 957) | def subproc_captured_stdout(*cmds):
function subproc_captured_inject (line 964) | def subproc_captured_inject(*cmds):
function subproc_captured_object (line 975) | def subproc_captured_object(*cmds):
function subproc_captured_hiddenobject (line 983) | def subproc_captured_hiddenobject(*cmds):
function subproc_uncaptured (line 990) | def subproc_uncaptured(*cmds):
function ensure_list_of_strs (line 997) | def ensure_list_of_strs(x):
function list_of_strs_or_callables (line 1008) | def list_of_strs_or_callables(x):
function list_of_list_of_strs_outer_product (line 1019) | def list_of_list_of_strs_outer_product(x):
function MACRO_FLAG_KINDS (line 1033) | def MACRO_FLAG_KINDS():
function _convert_kind_flag (line 1052) | def _convert_kind_flag(x):
function convert_macro_arg (line 1061) | def convert_macro_arg(raw_arg, kind, glbs, locs, *, name="<arg>", macron...
function in_macro_call (line 1124) | def in_macro_call(f, glbs, locs):
function call_macro (line 1152) | def call_macro(f, raw_args, glbs, locs):
function KWARG_RE (line 1192) | def KWARG_RE():
function _starts_as_arg (line 1196) | def _starts_as_arg(s):
function _eval_regular_args (line 1201) | def _eval_regular_args(raw_args, glbs, locs):
function enter_macro (line 1223) | def enter_macro(obj, raw_block, glbs, locs):
function load_builtins (line 1265) | def load_builtins(execer=None, ctx=None):
function _lastflush (line 1277) | def _lastflush(s=None, f=None):
function unload_builtins (line 1283) | def unload_builtins():
function xonsh_builtins (line 1306) | def xonsh_builtins(execer=None):
class XonshSession (line 1319) | class XonshSession:
method __init__ (line 1324) | def __init__(self, execer=None, ctx=None):
method load (line 1336) | def load(self, execer=None, ctx=None):
method link_builtins (line 1391) | def link_builtins(self, execer=None):
method unlink_builtins (line 1408) | def unlink_builtins(self):
class _BuiltIns (line 1423) | class _BuiltIns:
method __init__ (line 1424) | def __init__(self, execer=None):
class DynamicAccessProxy (line 1434) | class DynamicAccessProxy:
method __init__ (line 1437) | def __init__(self, refname, objname):
method obj (line 1452) | def obj(self):
method __getattr__ (line 1460) | def __getattr__(self, name):
method __setattr__ (line 1463) | def __setattr__(self, name, value):
method __delattr__ (line 1466) | def __delattr__(self, name):
method __getitem__ (line 1469) | def __getitem__(self, item):
method __setitem__ (line 1472) | def __setitem__(self, item, value):
method __delitem__ (line 1475) | def __delitem__(self, item):
method __call__ (line 1478) | def __call__(self, *args, **kwargs):
class DeprecationWarningProxy (line 1482) | class DeprecationWarningProxy:
method __init__ (line 1485) | def __init__(self, oldname, newname):
method obj (line 1490) | def obj(self):
method warn (line 1498) | def warn(self):
method __getattr__ (line 1508) | def __getattr__(self, name):
method __setattr__ (line 1512) | def __setattr__(self, name, value):
method __delattr__ (line 1516) | def __delattr__(self, name):
method __getitem__ (line 1520) | def __getitem__(self, item):
method __setitem__ (line 1524) | def __setitem__(self, item, value):
method __delitem__ (line 1528) | def __delitem__(self, item):
method __call__ (line 1532) | def __call__(self, *args, **kwargs):
function load_proxies (line 1537) | def load_proxies():
function unload_proxies (line 1597) | def unload_proxies():
FILE: xonsh/codecache.py
function _splitpath (line 13) | def _splitpath(path, sofar=[]):
function _CHARACTER_MAP (line 24) | def _CHARACTER_MAP():
function _cache_renamer (line 30) | def _cache_renamer(path, code=False):
function _make_if_not_exists (line 38) | def _make_if_not_exists(dirname):
function should_use_cache (line 43) | def should_use_cache(execer, mode):
function run_compiled_code (line 57) | def run_compiled_code(code, glb, loc, mode):
function get_cache_filename (line 70) | def get_cache_filename(fname, code=True):
function update_cache (line 88) | def update_cache(ccode, cache_file_name):
function _check_cache_versions (line 101) | def _check_cache_versions(cfile):
function compile_code (line 110) | def compile_code(filename, code, execer, glb, loc, mode):
function script_cache_check (line 127) | def script_cache_check(filename, cachefname):
function run_script_with_cache (line 147) | def run_script_with_cache(filename, execer, glb=None, loc=None, mode="ex...
function code_cache_name (line 165) | def code_cache_name(code):
function code_cache_check (line 176) | def code_cache_check(cachefname):
function run_code_with_cache (line 195) | def run_code_with_cache(code, execer, glb=None, loc=None, mode="exec"):
FILE: xonsh/color_tools.py
function BASE_XONSH_COLORS (line 20) | def BASE_XONSH_COLORS():
function CLUT (line 42) | def CLUT():
function _str2hex (line 309) | def _str2hex(hexstr):
function _strip_hash (line 313) | def _strip_hash(rgb):
function SHORT_TO_RGB (line 321) | def SHORT_TO_RGB():
function RGB_TO_SHORT (line 326) | def RGB_TO_SHORT():
function short2rgb (line 330) | def short2rgb(short):
function rgb_to_256 (line 334) | def rgb_to_256(rgb):
function RE_RGB3 (line 382) | def RE_RGB3():
function RE_RGB6 (line 387) | def RE_RGB6():
function rgb_to_ints (line 391) | def rgb_to_ints(rgb):
function short_to_ints (line 398) | def short_to_ints(short):
function color_dist (line 403) | def color_dist(x, y):
function find_closest_color (line 407) | def find_closest_color(x, palette):
function make_palette (line 411) | def make_palette(strings):
FILE: xonsh/commands_cache.py
class CommandsCache (line 20) | class CommandsCache(cabc.Mapping):
method __init__ (line 28) | def __init__(self):
method __contains__ (line 35) | def __contains__(self, key):
method __iter__ (line 39) | def __iter__(self):
method __len__ (line 47) | def __len__(self):
method __getitem__ (line 50) | def __getitem__(self, key):
method is_empty (line 54) | def is_empty(self):
method get_possible_names (line 59) | def get_possible_names(name):
method remove_dups (line 71) | def remove_dups(p):
method all_commands (line 79) | def all_commands(self):
method cached_name (line 116) | def cached_name(self, name):
method lazyin (line 126) | def lazyin(self, key):
method lazyiter (line 133) | def lazyiter(self):
method lazylen (line 140) | def lazylen(self):
method lazyget (line 147) | def lazyget(self, key, default=None):
method locate_binary (line 151) | def locate_binary(self, name, ignore_alias=False):
method lazy_locate_binary (line 166) | def lazy_locate_binary(self, name, ignore_alias=False):
method is_only_functional_alias (line 196) | def is_only_functional_alias(self, name):
method lazy_is_only_functional_alias (line 204) | def lazy_is_only_functional_alias(self, name):
method predict_threadable (line 216) | def predict_threadable(self, cmd):
method default_predictor (line 243) | def default_predictor(self, name, cmd0):
method default_predictor_readbin (line 251) | def default_predictor_readbin(self, name, cmd0, timeout, failure):
function predict_true (line 308) | def predict_true(args):
function predict_false (line 313) | def predict_false(args):
function SHELL_PREDICTOR_PARSER (line 319) | def SHELL_PREDICTOR_PARSER():
function predict_shell (line 326) | def predict_shell(args):
function HELP_VER_PREDICTOR_PARSER (line 339) | def HELP_VER_PREDICTOR_PARSER():
function predict_help_ver (line 348) | def predict_help_ver(args):
function HG_PREDICTOR_PARSER (line 362) | def HG_PREDICTOR_PARSER():
function predict_hg (line 371) | def predict_hg(args):
function default_threadable_predictors (line 383) | def default_threadable_predictors():
FILE: xonsh/completer.py
class Completer (line 7) | class Completer(object):
method complete (line 10) | def complete(self, prefix, line, begidx, endidx, ctx=None):
FILE: xonsh/completers/_aliases.py
function _add_one_completer (line 14) | def _add_one_completer(name, func, loc="end"):
function _list_completers (line 41) | def _list_completers(args, stdin=None, stack=None):
function _remove_completer (line 56) | def _remove_completer(args, stdin=None, stack=None):
function _register_completer (line 71) | def _register_completer(args, stdin=None, stack=None):
function completer_alias (line 106) | def completer_alias(args, stdin=None, stdout=None, stderr=None, spec=Non...
FILE: xonsh/completers/base.py
function complete_base (line 9) | def complete_base(prefix, line, start, end, ctx):
FILE: xonsh/completers/bash.py
function complete_from_bash (line 9) | def complete_from_bash(prefix, line, begidx, endidx, ctx):
FILE: xonsh/completers/bash_completion.py
function _git_for_windows_path (line 21) | def _git_for_windows_path():
function _windows_bash_command (line 34) | def _windows_bash_command(env=None):
function _bash_command (line 64) | def _bash_command(env=None):
function _bash_completion_paths_default (line 73) | def _bash_completion_paths_default():
function _get_bash_completions_source (line 104) | def _get_bash_completions_source(paths=None):
function _bash_get_sep (line 116) | def _bash_get_sep():
function _bash_pattern_need_quotes (line 129) | def _bash_pattern_need_quotes():
function _bash_expand_path (line 141) | def _bash_expand_path(s):
function _bash_quote_to_use (line 156) | def _bash_quote_to_use(x):
function _bash_quote_paths (line 165) | def _bash_quote_paths(paths, start, end):
function bash_completions (line 264) | def bash_completions(
function bash_complete_line (line 389) | def bash_complete_line(line, return_line=True, **kwargs):
function _bc_main (line 427) | def _bc_main(args=None):
FILE: xonsh/completers/commands.py
function complete_command (line 13) | def complete_command(cmd, line, start, end, ctx):
function complete_skipper (line 33) | def complete_skipper(cmd, line, start, end, ctx):
FILE: xonsh/completers/completer.py
function complete_completer (line 4) | def complete_completer(prefix, line, start, end, ctx):
FILE: xonsh/completers/dirs.py
function complete_cd (line 5) | def complete_cd(prefix, line, start, end, ctx):
function complete_rmdir (line 14) | def complete_rmdir(prefix, line, start, end, ctx):
FILE: xonsh/completers/init.py
function default_completers (line 20) | def default_completers():
FILE: xonsh/completers/man.py
function SCRAPE_RE (line 16) | def SCRAPE_RE():
function INNER_OPTIONS_RE (line 21) | def INNER_OPTIONS_RE():
function complete_from_man (line 25) | def complete_from_man(prefix, line, start, end, ctx):
FILE: xonsh/completers/path.py
function PATTERN_NEED_QUOTES (line 15) | def PATTERN_NEED_QUOTES():
function cd_in_command (line 23) | def cd_in_command(line):
function _path_from_partial_string (line 36) | def _path_from_partial_string(inp, pos=None):
function _normpath (line 70) | def _normpath(p):
function _startswithlow (line 90) | def _startswithlow(x, start, startlow=None):
function _startswithnorm (line 96) | def _startswithnorm(x, start, startlow=None):
function _env (line 100) | def _env(prefix):
function _dots (line 109) | def _dots(prefix):
function _add_cdpaths (line 121) | def _add_cdpaths(paths, prefix):
function _quote_to_use (line 135) | def _quote_to_use(x):
function _quote_paths (line 144) | def _quote_paths(paths, start, end, append_end=True):
function _joinpath (line 185) | def _joinpath(path):
function _splitpath (line 199) | def _splitpath(path):
function _splitpath_helper (line 210) | def _splitpath_helper(path, sofar=()):
function subsequence_match (line 223) | def subsequence_match(ref, typed, csc):
function _subsequence_match_iter (line 240) | def _subsequence_match_iter(ref, typed):
function _expand_one (line 251) | def _expand_one(sofar, nextone, csc):
function complete_path (line 263) | def complete_path(prefix, line, start, end, ctx, cdpath=True, filtfunc=N...
function complete_dir (line 325) | def complete_dir(prefix, line, start, end, ctx, cdpath=False):
FILE: xonsh/completers/pip.py
function PIP_RE (line 11) | def PIP_RE():
function PIP_LIST_RE (line 16) | def PIP_LIST_RE():
function ALL_COMMANDS (line 21) | def ALL_COMMANDS():
function complete_pip (line 32) | def complete_pip(prefix, line, begidx, endidx, ctx):
FILE: xonsh/completers/python.py
function RE_ATTR (line 16) | def RE_ATTR():
function XONSH_EXPR_TOKENS (line 21) | def XONSH_EXPR_TOKENS():
function XONSH_STMT_TOKENS (line 66) | def XONSH_STMT_TOKENS():
function XONSH_TOKENS (line 123) | def XONSH_TOKENS():
function complete_python (line 127) | def complete_python(prefix, line, start, end, ctx):
function _complete_python (line 146) | def _complete_python(prefix, line, start, end, ctx):
function complete_python_mode (line 174) | def complete_python_mode(prefix, line, start, end, ctx):
function _safe_eval (line 187) | def _safe_eval(expr, ctx):
function attr_complete (line 205) | def attr_complete(prefix, ctx, filter_func):
function python_signature_complete (line 246) | def python_signature_complete(prefix, line, end, ctx, filter_func):
function complete_import (line 265) | def complete_import(prefix, line, start, end, ctx):
function complete_module (line 289) | def complete_module(prefix):
FILE: xonsh/completers/tools.py
function _filter_normal (line 6) | def _filter_normal(s, x):
function _filter_ignorecase (line 10) | def _filter_ignorecase(s, x):
function get_filter_function (line 14) | def get_filter_function():
function justify (line 26) | def justify(s, max_length, left_pad=0):
FILE: xonsh/completers/xompletions.py
function complete_xonfig (line 7) | def complete_xonfig(prefix, line, start, end, ctx):
function _list_installed_xontribs (line 22) | def _list_installed_xontribs():
function complete_xontrib (line 34) | def complete_xontrib(prefix, line, start, end, ctx):
FILE: xonsh/contexts.py
class Block (line 8) | class Block(object):
method __init__ (line 16) | def __init__(self):
method __enter__ (line 29) | def __enter__(self):
method __exit__ (line 39) | def __exit__(self, exc_type, exc_value, traceback):
class Functor (line 43) | class Functor(Block):
method __init__ (line 48) | def __init__(self, args=(), kwargs=None, rtn=""):
method __enter__ (line 76) | def __enter__(self):
method __exit__ (line 109) | def __exit__(self, exc_type, exc_value, traceback):
method __call__ (line 112) | def __call__(self, *args, **kwargs):
FILE: xonsh/diff_history.py
function bold_str_diff (line 24) | def bold_str_diff(a, b, sm=None):
function redline (line 46) | def redline(line):
function greenline (line 50) | def greenline(line):
function highlighted_ndiff (line 56) | def highlighted_ndiff(a, b):
class HistoryDiffer (line 85) | class HistoryDiffer(object):
method __init__ (line 88) | def __init__(self, afile, bfile, reopen=False, verbose=False):
method __del__ (line 108) | def __del__(self):
method __str__ (line 112) | def __str__(self):
method _header_line (line 115) | def _header_line(self, lj):
method header (line 127) | def header(self):
method _env_both_diff (line 139) | def _env_both_diff(self, in_both, aenv, benv):
method _env_in_one_diff (line 151) | def _env_in_one_diff(self, x, y, color, xid, xenv):
method envdiff (line 165) | def envdiff(self):
method _cmd_in_one_diff (line 186) | def _cmd_in_one_diff(self, inp, i, xlj, xid, color):
method _cmd_out_and_rtn_diff (line 200) | def _cmd_out_and_rtn_diff(self, i, j):
method _cmd_replace_diff (line 232) | def _cmd_replace_diff(self, i, ainp, aid, j, binp, bid):
method cmdsdiff (line 246) | def cmdsdiff(self):
method format (line 297) | def format(self):
function dh_create_parser (line 312) | def dh_create_parser(p=None):
function dh_main_action (line 343) | def dh_main_action(ns, hist=None, stdout=None, stderr=None):
FILE: xonsh/dirstack.py
function _unc_check_enabled (line 20) | def _unc_check_enabled() -> bool:
function _is_unc_path (line 58) | def _is_unc_path(some_path) -> bool:
function _unc_map_temp_drive (line 67) | def _unc_map_temp_drive(unc_path) -> str:
function _unc_unmap_temp_drive (line 104) | def _unc_unmap_temp_drive(left_drive, cwd):
function _get_cwd (line 139) | def _get_cwd():
function _change_working_directory (line 146) | def _change_working_directory(newdir, follow_symlinks=False):
function _try_cdpath (line 173) | def _try_cdpath(apath):
function cd (line 191) | def cd(args, stdin=None):
function pushd_parser (line 272) | def pushd_parser():
function pushd (line 292) | def pushd(args, stdin=None):
function popd_parser (line 375) | def popd_parser():
function popd (line 395) | def popd(args, stdin=None):
function dirs_parser (line 472) | def dirs_parser():
function dirs (line 505) | def dirs(args, stdin=None):
FILE: xonsh/dumb_shell.py
class DumbShell (line 7) | class DumbShell(ReadlineShell):
method __init__ (line 10) | def __init__(self, *args, **kwargs):
FILE: xonsh/environ.py
function HELP_TEMPLATE (line 127) | def HELP_TEMPLATE():
function LOCALE_CATS (line 137) | def LOCALE_CATS():
function locale_convert (line 150) | def locale_convert(key):
function to_debug (line 165) | def to_debug(x):
class LsColors (line 184) | class LsColors(cabc.MutableMapping):
method __init__ (line 322) | def __init__(self, *args, **kwargs):
method __getitem__ (line 327) | def __getitem__(self, key):
method __setitem__ (line 330) | def __setitem__(self, key, value):
method __delitem__ (line 334) | def __delitem__(self, key):
method __len__ (line 338) | def __len__(self):
method __iter__ (line 341) | def __iter__(self):
method __str__ (line 344) | def __str__(self):
method __repr__ (line 347) | def __repr__(self):
method _repr_pretty_ (line 352) | def _repr_pretty_(self, p, cycle):
method detype (line 361) | def detype(self):
method style_name (line 374) | def style_name(self):
method style (line 384) | def style(self):
method fromstring (line 393) | def fromstring(cls, s):
method fromdircolors (line 414) | def fromdircolors(cls, filename=None):
method convert (line 440) | def convert(cls, x):
function is_lscolors (line 452) | def is_lscolors(x):
function ensure_ls_colors_in_env (line 458) | def ensure_ls_colors_in_env(spec=None, **kwargs):
function DEFAULT_ENSURERS (line 481) | def DEFAULT_ENSURERS():
function default_value (line 598) | def default_value(f):
function is_callable_default (line 604) | def is_callable_default(x):
function xonsh_data_dir (line 613) | def xonsh_data_dir(env):
function xonsh_config_dir (line 621) | def xonsh_config_dir(env):
function xonshconfig (line 628) | def xonshconfig(env):
function default_xonshrc (line 636) | def default_xonshrc(env):
function xonsh_append_newline (line 660) | def xonsh_append_newline(env):
function default_lscolors (line 666) | def default_lscolors(env):
function DEFAULT_VALUES (line 682) | def DEFAULT_VALUES():
function DEFAULT_DOCS (line 807) | def DEFAULT_DOCS():
class Env (line 1309) | class Env(cabc.MutableMapping):
method __init__ (line 1325) | def __init__(self, *args, **kwargs):
method detype (line 1348) | def detype(self):
method replace_env (line 1367) | def replace_env(self):
method undo_replace_env (line 1376) | def undo_replace_env(self):
method _get_default_ensurer (line 1385) | def _get_default_ensurer(self, default=None):
method get_ensurer (line 1392) | def get_ensurer(self, key, default=None):
method set_ensurer (line 1406) | def set_ensurer(self, key, value):
method get_docs (line 1411) | def get_docs(self, key, default=VarDocs("<no documentation>")):
method help (line 1422) | def help(self, key):
method is_manually_set (line 1435) | def is_manually_set(self, varname):
method swap (line 1442) | def swap(self, other=None, **kwargs):
method __getitem__ (line 1477) | def __getitem__(self, key):
method __setitem__ (line 1496) | def __setitem__(self, key, val):
method __delitem__ (line 1518) | def __delitem__(self, key):
method get (line 1524) | def get(self, key, default=None):
method __iter__ (line 1533) | def __iter__(self):
method __contains__ (line 1536) | def __contains__(self, item):
method __len__ (line 1539) | def __len__(self):
method __str__ (line 1542) | def __str__(self):
method __repr__ (line 1545) | def __repr__(self):
method _repr_pretty_ (line 1550) | def _repr_pretty_(self, p, cycle):
function _yield_executables (line 1560) | def _yield_executables(directory, name):
function locate_binary (line 1574) | def locate_binary(name):
function xonshrc_context (line 1590) | def xonshrc_context(rcfiles=None, execer=None, ctx=None, env=None, login...
function windows_foreign_env_fixes (line 1607) | def windows_foreign_env_fixes(ctx):
function foreign_env_fixes (line 1624) | def foreign_env_fixes(ctx):
function xonsh_script_run_control (line 1630) | def xonsh_script_run_control(filename, ctx, env, execer=None, login=True):
function default_env (line 1650) | def default_env(env=None):
function make_args_env (line 1670) | def make_args_env(args=None):
FILE: xonsh/events.py
function has_kwargs (line 18) | def has_kwargs(func):
function debug_level (line 24) | def debug_level():
class AbstractEvent (line 32) | class AbstractEvent(collections.abc.MutableSet, abc.ABC):
method species (line 42) | def species(self):
method __call__ (line 50) | def __call__(self, handler):
method _filterhandlers (line 92) | def _filterhandlers(self, handlers, **kwargs):
method fire (line 102) | def fire(self, **kwargs):
class Event (line 113) | class Event(AbstractEvent):
method __init__ (line 119) | def __init__(self):
method __len__ (line 125) | def __len__(self):
method __contains__ (line 128) | def __contains__(self, item):
method __iter__ (line 131) | def __iter__(self):
method add (line 134) | def add(self, item):
method discard (line 147) | def discard(self, item):
method fire (line 160) | def fire(self, **kwargs):
class LoadEvent (line 198) | class LoadEvent(AbstractEvent):
method __init__ (line 210) | def __init__(self):
method __len__ (line 215) | def __len__(self):
method __contains__ (line 218) | def __contains__(self, item):
method __iter__ (line 221) | def __iter__(self):
method add (line 225) | def add(self, item):
method discard (line 237) | def discard(self, item):
method _call (line 246) | def _call(self, handler):
method fire (line 252) | def fire(self, **kwargs):
class EventManager (line 263) | class EventManager:
method doc (line 272) | def doc(self, name, docstring):
method _mkevent (line 286) | def _mkevent(name, species=Event, doc=None):
method transmogrify (line 299) | def transmogrify(self, name, species):
method exists (line 325) | def exists(self, name):
method __getattr__ (line 332) | def __getattr__(self, name):
FILE: xonsh/execer.py
class Execer (line 22) | class Execer(object):
method __init__ (line 25) | def __init__(
method __del__ (line 65) | def __del__(self):
method parse (line 70) | def parse(self, input, ctx, mode="exec", filename=None, transform=True):
method compile (line 115) | def compile(
method eval (line 141) | def eval(
method exec (line 163) | def exec(
method _print_debug_wrapping (line 192) | def _print_debug_wrapping(
method _parse_ctx_free (line 204) | def _parse_ctx_free(self, input, mode="exec", filename=None, logical_i...
FILE: xonsh/foreign_shells.py
function CANON_SHELL_NAMES (line 94) | def CANON_SHELL_NAMES():
function DEFAULT_ENVCMDS (line 107) | def DEFAULT_ENVCMDS():
function DEFAULT_ALIASCMDS (line 112) | def DEFAULT_ALIASCMDS():
function DEFAULT_FUNCSCMDS (line 117) | def DEFAULT_FUNCSCMDS():
function DEFAULT_SOURCERS (line 122) | def DEFAULT_SOURCERS():
function DEFAULT_TMPFILE_EXT (line 127) | def DEFAULT_TMPFILE_EXT():
function DEFAULT_RUNCMD (line 132) | def DEFAULT_RUNCMD():
function DEFAULT_SETERRPREVCMD (line 137) | def DEFAULT_SETERRPREVCMD():
function DEFAULT_SETERRPOSTCMD (line 142) | def DEFAULT_SETERRPOSTCMD():
function foreign_shell_data (line 147) | def foreign_shell_data(
function ENV_RE (line 308) | def ENV_RE():
function ENV_SPLIT_RE (line 313) | def ENV_SPLIT_RE():
function parse_env (line 317) | def parse_env(s):
function ALIAS_RE (line 329) | def ALIAS_RE():
function FS_EXEC_ALIAS_RE (line 336) | def FS_EXEC_ALIAS_RE():
function parse_aliases (line 340) | def parse_aliases(s, shell, sourcer=None, extra_args=()):
function FUNCS_RE (line 384) | def FUNCS_RE():
function parse_funcs (line 390) | def parse_funcs(s, shell, sourcer=None, extra_args=()):
class ForeignShellBaseAlias (line 431) | class ForeignShellBaseAlias(object):
method __init__ (line 438) | def __init__(self, shell, filename, sourcer=None, extra_args=()):
method _input_kwargs (line 457) | def _input_kwargs(self):
method __eq__ (line 465) | def __eq__(self, other):
method __call__ (line 470) | def __call__(
method __repr__ (line 490) | def __repr__(self):
method _is_streaming (line 504) | def _is_streaming(args):
class ForeignShellFunctionAlias (line 513) | class ForeignShellFunctionAlias(ForeignShellBaseAlias):
method __init__ (line 520) | def __init__(self, funcname, shell, filename, sourcer=None, extra_args...
method _input_kwargs (line 540) | def _input_kwargs(self):
class ForeignShellExecAlias (line 546) | class ForeignShellExecAlias(ForeignShellBaseAlias):
method __init__ (line 551) | def __init__(
method _input_kwargs (line 578) | def _input_kwargs(self):
function VALID_SHELL_PARAMS (line 585) | def VALID_SHELL_PARAMS():
function ensure_shell (line 604) | def ensure_shell(shell):
function load_foreign_envs (line 665) | def load_foreign_envs(shells):
function load_foreign_aliases (line 688) | def load_foreign_aliases(shells):
FILE: xonsh/fs.py
class PathLike (line 14) | class PathLike(abc.ABC):
method __fspath__ (line 18) | def __fspath__(self):
function fspath (line 24) | def fspath(path):
function _fscodec (line 59) | def _fscodec():
function open (line 95) | def open(file, *pargs, **kwargs):
FILE: xonsh/history/base.py
class HistoryEntry (line 7) | class HistoryEntry(types.SimpleNamespace):
class History (line 25) | class History:
method __init__ (line 55) | def __init__(self, sessionid=None, **kwargs):
method __len__ (line 75) | def __len__(self):
method __getitem__ (line 79) | def __getitem__(self, item):
method __setitem__ (line 105) | def __setitem__(self, *args):
method append (line 110) | def append(self, cmd):
method flush (line 123) | def flush(self, **kwargs):
method items (line 127) | def items(self, newest_first=False):
method all_items (line 131) | def all_items(self, newest_first=False):
method info (line 135) | def info(self):
method run_gc (line 145) | def run_gc(self, size=None, blocking=True):
FILE: xonsh/history/dummy.py
class DummyHistory (line 7) | class DummyHistory(History):
method append (line 10) | def append(self, cmd):
method items (line 13) | def items(self, newest_first=False):
method all_items (line 16) | def all_items(self, newest_first=False):
method info (line 19) | def info(self):
FILE: xonsh/history/json.py
function _xhj_gc_commands_to_rmfiles (line 18) | def _xhj_gc_commands_to_rmfiles(hsize, files):
function _xhj_gc_files_to_rmfiles (line 35) | def _xhj_gc_files_to_rmfiles(hsize, files):
function _xhj_gc_seconds_to_rmfiles (line 41) | def _xhj_gc_seconds_to_rmfiles(hsize, files):
function _xhj_gc_bytes_to_rmfiles (line 52) | def _xhj_gc_bytes_to_rmfiles(hsize, files):
function _xhj_get_history_files (line 67) | def _xhj_get_history_files(sort=True, newest_first=False):
class JsonHistoryGC (line 88) | class JsonHistoryGC(threading.Thread):
method __init__ (line 91) | def __init__(self, wait_for_shell=True, size=None, *args, **kwargs):
method run (line 108) | def run(self):
method files (line 127) | def files(self, only_unlocked=False):
class JsonHistoryFlusher (line 168) | class JsonHistoryFlusher(threading.Thread):
method __init__ (line 171) | def __init__(self, filename, buffer, queue, cond, at_exit=False, *args...
method run (line 186) | def run(self):
method i_am_at_the_front (line 192) | def i_am_at_the_front(self):
method dump (line 196) | def dump(self):
class JsonCommandField (line 223) | class JsonCommandField(cabc.Sequence):
method __init__ (line 226) | def __init__(self, field, hist, default=None):
method __len__ (line 245) | def __len__(self):
method __getitem__ (line 248) | def __getitem__(self, key):
method i_am_at_the_front (line 274) | def i_am_at_the_front(self):
class JsonHistory (line 279) | class JsonHistory(History):
method __init__ (line 285) | def __init__(self, filename=None, sessionid=None, buffersize=100, gc=T...
method __len__ (line 333) | def __len__(self):
method append (line 336) | def append(self, cmd):
method flush (line 360) | def flush(self, at_exit=False):
method items (line 382) | def items(self, newest_first=False):
method all_items (line 391) | def all_items(self, newest_first=False, **kwargs):
method info (line 420) | def info(self):
method run_gc (line 432) | def run_gc(self, size=None, blocking=True):
FILE: xonsh/history/main.py
function construct_history (line 22) | def construct_history(**kwargs):
function _xh_session_parser (line 41) | def _xh_session_parser(hist=None, newest_first=False, **kwargs):
function _xh_all_parser (line 48) | def _xh_all_parser(hist=None, newest_first=False, **kwargs):
function _xh_find_histfile_var (line 55) | def _xh_find_histfile_var(file_list, default=None):
function _xh_bash_hist_parser (line 77) | def _xh_bash_hist_parser(location=None, **kwargs):
function _xh_zsh_hist_parser (line 92) | def _xh_zsh_hist_parser(location=None, **kwargs):
function _xh_filter_ts (line 120) | def _xh_filter_ts(commands, start_time, end_time):
function _xh_get_history (line 127) | def _xh_get_history(
function _xh_show_history (line 175) | def _xh_show_history(hist, ns, stdout=None, stderr=None):
function _XH_HISTORY_SESSIONS (line 216) | def _XH_HISTORY_SESSIONS():
function _xh_create_parser (line 230) | def _xh_create_parser():
function _xh_parse_args (line 355) | def _xh_parse_args(args):
function history_main (line 380) | def history_main(
FILE: xonsh/history/sqlite.py
function _xh_sqlite_get_file_name (line 16) | def _xh_sqlite_get_file_name():
function _xh_sqlite_get_conn (line 25) | def _xh_sqlite_get_conn(filename=None):
function _xh_sqlite_create_history_table (line 31) | def _xh_sqlite_create_history_table(cursor):
function _xh_sqlite_insert_command (line 52) | def _xh_sqlite_insert_command(cursor, cmd, sessionid, store_stdout):
function _xh_sqlite_get_count (line 67) | def _xh_sqlite_get_count(cursor, sessionid=None):
function _xh_sqlite_get_records (line 77) | def _xh_sqlite_get_records(cursor, sessionid=None, limit=None, newest_fi...
function _xh_sqlite_delete_records (line 92) | def _xh_sqlite_delete_records(cursor, size_to_keep):
function xh_sqlite_append_history (line 106) | def xh_sqlite_append_history(cmd, sessionid, store_stdout, filename=None):
function xh_sqlite_get_count (line 114) | def xh_sqlite_get_count(sessionid=None, filename=None):
function xh_sqlite_items (line 120) | def xh_sqlite_items(sessionid=None, filename=None, newest_first=False):
function xh_sqlite_delete_items (line 127) | def xh_sqlite_delete_items(size_to_keep, filename=None):
class SqliteHistoryGC (line 134) | class SqliteHistoryGC(threading.Thread):
method __init__ (line 137) | def __init__(self, wait_for_shell=True, size=None, filename=None, *arg...
method run (line 149) | def run(self):
class SqliteHistory (line 169) | class SqliteHistory(History):
method __init__ (line 172) | def __init__(self, gc=True, filename=None, **kwargs):
method append (line 184) | def append(self, cmd):
method all_items (line 209) | def all_items(self, newest_first=False):
method items (line 214) | def items(self, newest_first=False):
method info (line 223) | def info(self):
method run_gc (line 236) | def run_gc(self, size=None, blocking=True):
FILE: xonsh/imphooks.py
function ENCODING_LINE (line 23) | def ENCODING_LINE():
function find_source_encoding (line 29) | def find_source_encoding(src):
class XonshImportHook (line 46) | class XonshImportHook(MetaPathFinder, SourceLoader):
method __init__ (line 49) | def __init__(self, *args, **kwargs):
method execer (line 55) | def execer(self):
method find_spec (line 73) | def find_spec(self, fullname, path, target=None):
method create_module (line 97) | def create_module(self, spec):
method get_filename (line 105) | def get_filename(self, fullname):
method get_data (line 109) | def get_data(self, path):
method get_code (line 113) | def get_code(self, fullname):
function _should_dispatch_xonsh_import_event_loader (line 207) | def _should_dispatch_xonsh_import_event_loader():
class XonshImportEventHook (line 217) | class XonshImportEventHook(MetaPathFinder):
method __init__ (line 220) | def __init__(self, *args, **kwargs):
method append_stack (line 225) | def append_stack(self, fullname):
method find_spec (line 236) | def find_spec(self, fullname, path, target=None):
class XonshImportEventLoader (line 264) | class XonshImportEventLoader(Loader):
method __init__ (line 269) | def __init__(self, loader):
method create_module (line 275) | def create_module(self, spec):
method exec_module (line 282) | def exec_module(self, module):
method load_module (line 289) | def load_module(self, fullname):
method module_repr (line 293) | def module_repr(self, module):
function install_import_hooks (line 298) | def install_import_hooks():
FILE: xonsh/inspectors.py
function object_info (line 80) | def object_info(**kw):
function get_encoding (line 87) | def get_encoding(obj):
function getdoc (line 111) | def getdoc(obj):
function getsource (line 139) | def getsource(obj, is_binary=False):
function is_simple_callable (line 170) | def is_simple_callable(obj):
function getargspec (line 180) | def getargspec(obj):
function format_argspec (line 193) | def format_argspec(argspec):
function call_tip (line 204) | def call_tip(oinfo, format_call=True):
function find_file (line 257) | def find_file(obj):
function find_source_lines (line 294) | def find_source_lines(obj):
function getouterframes (line 335) | def getouterframes(frame, context=1):
class Inspector (line 344) | class Inspector(object):
method __init__ (line 347) | def __init__(self, str_detail_level=0):
method _getdef (line 350) | def _getdef(self, obj, oname=""):
method noinfo (line 362) | def noinfo(self, msg, oname):
method pdef (line 370) | def pdef(self, obj, oname=""):
method pdoc (line 392) | def pdoc(self, obj, oname=""):
method psource (line 423) | def psource(self, obj, oname=""):
method pfile (line 434) | def pfile(self, obj, oname=""):
method _format_fields_str (line 456) | def _format_fields_str(self, fields, title_width=0):
method _format_fields_tokens (line 479) | def _format_fields_tokens(self, fields, title_width=0):
method _format_fields (line 509) | def _format_fields(self, fields, title_width=0):
method pinfo (line 544) | def pinfo(self, obj, oname="", info=None, detail_level=0):
method info (line 598) | def info(self, obj, oname="", info=None, detail_level=0):
FILE: xonsh/jobs.py
function _send_signal (line 25) | def _send_signal(job, signal):
function _send_signal (line 43) | def _send_signal(job, signal):
function _send_signal (line 56) | def _send_signal(job, signal):
function _continue (line 70) | def _continue(job):
function _kill (line 73) | def _kill(job):
function ignore_sigtstp (line 76) | def ignore_sigtstp():
function give_terminal_to (line 79) | def give_terminal_to(pgid):
function wait_for_active_job (line 82) | def wait_for_active_job(last_task=None, backgrounded=False):
function _continue (line 106) | def _continue(job):
function _kill (line 109) | def _kill(job):
function ignore_sigtstp (line 112) | def ignore_sigtstp():
function _pthread_sigmask (line 134) | def _pthread_sigmask(how, signals):
function give_terminal_to (line 158) | def give_terminal_to(pgid):
function wait_for_active_job (line 187) | def wait_for_active_job(last_task=None, backgrounded=False, _nochild=Fal...
function get_next_task (line 222) | def get_next_task():
function get_task (line 237) | def get_task(tid):
function _clear_dead_jobs (line 241) | def _clear_dead_jobs():
function print_one_job (line 252) | def print_one_job(num, outfile=sys.stdout):
function get_next_job_number (line 267) | def get_next_job_number():
function add_job (line 277) | def add_job(info):
function clean_jobs (line 288) | def clean_jobs():
function kill_all_jobs (line 340) | def kill_all_jobs():
function jobs (line 349) | def jobs(args, stdin=None, stdout=sys.stdout, stderr=None):
function resume_job (line 361) | def resume_job(args, wording):
function fg (line 401) | def fg(args, stdin=None):
function bg (line 412) | def bg(args, stdin=None):
FILE: xonsh/jsonutils.py
function serialize_xonsh_json (line 10) | def serialize_xonsh_json(val):
function _serialize_xonsh_json_env_path (line 18) | def _serialize_xonsh_json_env_path(val):
FILE: xonsh/jupyter_kernel.py
function dump_bytes (line 30) | def dump_bytes(*args, **kwargs):
function load_bytes (line 35) | def load_bytes(b):
function bind (line 40) | def bind(socket, connection, port):
class XonshKernel (line 49) | class XonshKernel:
method __init__ (line 67) | def __init__(self, debug_level=0, session_id=None, config=None, **kwar...
method parser (line 91) | def parser(self):
method make_default_config (line 98) | def make_default_config(self):
method iopub_handler (line 121) | def iopub_handler(self, message):
method control_handler (line 125) | def control_handler(self, wire_message):
method stdin_handler (line 132) | def stdin_handler(self, message):
method start (line 135) | def start(self):
method shutdown (line 191) | def shutdown(self):
method dprint (line 196) | def dprint(self, level, *args, **kwargs):
method sign (line 202) | def sign(self, messages):
method new_header (line 209) | def new_header(self, message_type):
method send (line 220) | def send(
method deserialize_wire_message (line 248) | def deserialize_wire_message(self, wire_message):
method run_thread (line 262) | def run_thread(self, loop, name):
method heartbeat_loop (line 285) | def heartbeat_loop(self):
method shell_handler (line 300) | def shell_handler(self, message):
method handle_execute_request (line 310) | def handle_execute_request(self, message, identities):
method do_execute (line 348) | def do_execute(
method _respond_in_chunks (line 395) | def _respond_in_chunks(self, name, s, chunksize=1024, parent_header=No...
method handle_complete_request (line 409) | def handle_complete_request(self, message, identities):
method do_complete (line 422) | def do_complete(self, code, pos):
method handle_kernel_info_request (line 442) | def handle_kernel_info_request(self, message, identities):
FILE: xonsh/jupyter_shell.py
class StdJupyterRedirectBuf (line 9) | class StdJupyterRedirectBuf(io.RawIOBase):
method __init__ (line 12) | def __init__(self, redirect):
method fileno (line 17) | def fileno(self):
method seek (line 21) | def seek(self, offset, whence=io.SEEK_SET):
method truncate (line 25) | def truncate(self, size=None):
method readinto (line 29) | def readinto(self, b):
method write (line 33) | def write(self, b):
class StdJupyterRedirect (line 39) | class StdJupyterRedirect(io.TextIOBase):
method __init__ (line 42) | def __init__(self, name, kernel, parent_header=None):
method encoding (line 62) | def encoding(self):
method errors (line 68) | def errors(self):
method newlines (line 74) | def newlines(self):
method _replace_std (line 78) | def _replace_std(self):
method __del__ (line 85) | def __del__(self):
method close (line 88) | def close(self):
method __enter__ (line 92) | def __enter__(self):
method __exit__ (line 95) | def __exit__(self, *args, **kwargs):
method write (line 98) | def write(self, s):
method flush (line 102) | def flush(self):
method fileno (line 106) | def fileno(self):
method seek (line 110) | def seek(self, offset, whence=io.SEEK_SET):
method truncate (line 114) | def truncate(self, size=None):
method detach (line 118) | def detach(self):
method read (line 122) | def read(self, size=None):
method readline (line 126) | def readline(self, size=-1):
class JupyterShell (line 131) | class JupyterShell(BaseShell):
method __init__ (line 134) | def __init__(self, *args, **kwargs):
method default (line 138) | def default(self, line, kernel, parent_header=None):
FILE: xonsh/lazyasd.py
class LazyObject (line 16) | class LazyObject(object):
method __init__ (line 17) | def __init__(self, load, ctx, name):
method _lazy_obj (line 41) | def _lazy_obj(self):
method __getattribute__ (line 51) | def __getattribute__(self, name):
method __bool__ (line 57) | def __bool__(self):
method __iter__ (line 61) | def __iter__(self):
method __getitem__ (line 65) | def __getitem__(self, item):
method __setitem__ (line 69) | def __setitem__(self, key, value):
method __delitem__ (line 73) | def __delitem__(self, item):
method __call__ (line 77) | def __call__(self, *args, **kwargs):
method __lt__ (line 81) | def __lt__(self, other):
method __le__ (line 85) | def __le__(self, other):
method __eq__ (line 89) | def __eq__(self, other):
method __ne__ (line 93) | def __ne__(self, other):
method __gt__ (line 97) | def __gt__(self, other):
method __ge__ (line 101) | def __ge__(self, other):
method __hash__ (line 105) | def __hash__(self):
method __or__ (line 109) | def __or__(self, other):
method __str__ (line 113) | def __str__(self):
method __repr__ (line 116) | def __repr__(self):
function lazyobject (line 120) | def lazyobject(f):
class LazyDict (line 125) | class LazyDict(cabc.MutableMapping):
method __init__ (line 126) | def __init__(self, loaders, ctx, name):
method _destruct (line 159) | def _destruct(self):
method __getitem__ (line 163) | def __getitem__(self, key):
method __setitem__ (line 174) | def __setitem__(self, key, value):
method __delitem__ (line 180) | def __delitem__(self, key):
method __iter__ (line 187) | def __iter__(self):
method __len__ (line 190) | def __len__(self):
function lazydict (line 194) | def lazydict(f):
class LazyBool (line 199) | class LazyBool(object):
method __init__ (line 200) | def __init__(self, load, ctx, name):
method __bool__ (line 227) | def __bool__(self):
function lazybool (line 235) | def lazybool(f):
class BackgroundModuleProxy (line 245) | class BackgroundModuleProxy(types.ModuleType):
method __init__ (line 250) | def __init__(self, modname):
method __getattribute__ (line 253) | def __getattribute__(self, name):
class BackgroundModuleLoader (line 275) | class BackgroundModuleLoader(threading.Thread):
method __init__ (line 278) | def __init__(self, name, package, replacements, *args, **kwargs):
method run (line 286) | def run(self):
function load_module_in_background (line 311) | def load_module_in_background(
FILE: xonsh/lazyimps.py
function pty (line 16) | def pty():
function termios (line 24) | def termios():
function fcntl (line 32) | def fcntl():
function tty (line 40) | def tty():
function _winapi (line 48) | def _winapi():
function msvcrt (line 57) | def msvcrt():
function winutils (line 66) | def winutils():
function macutils (line 75) | def macutils():
function terminal256 (line 84) | def terminal256():
FILE: xonsh/lazyjson.py
function _to_json_with_size (line 10) | def _to_json_with_size(obj, offset=0, sort_keys=False):
function index (line 64) | def index(obj, sort_keys=False):
function dumps (line 79) | def dumps(obj, sort_keys=False):
function ljdump (line 93) | def ljdump(obj, fp, sort_keys=False):
class LJNode (line 99) | class LJNode(cabc.Mapping, cabc.Sequence):
method __init__ (line 102) | def __init__(self, offsets, sizes, root):
method __len__ (line 118) | def __len__(self):
method load (line 123) | def load(self):
method _load_or_node (line 136) | def _load_or_node(self, offset, size):
method _getitem_mapping (line 148) | def _getitem_mapping(self, key):
method _getitem_sequence (line 155) | def _getitem_sequence(self, key):
method __getitem__ (line 165) | def __getitem__(self, key):
method __iter__ (line 174) | def __iter__(self):
class LazyJSON (line 189) | class LazyJSON(LJNode):
method __init__ (line 194) | def __init__(self, f, reopen=True):
method __del__ (line 211) | def __del__(self):
method close (line 214) | def close(self):
method _open (line 223) | def _open(self, *args, **kwargs):
method _load_index (line 231) | def _load_index(self):
method __enter__ (line 246) | def __enter__(self):
method __exit__ (line 249) | def __exit__(self, exc_type, exc_value, traceback):
FILE: xonsh/lexer.py
function token_map (line 41) | def token_map():
function RE_NEED_WHITESPACE (line 121) | def RE_NEED_WHITESPACE():
function handle_name (line 126) | def handle_name(state, token):
function _end_delimiter (line 149) | def _end_delimiter(state, token):
function handle_rparen (line 162) | def handle_rparen(state, token):
function handle_rbrace (line 174) | def handle_rbrace(state, token):
function handle_rbracket (line 184) | def handle_rbracket(state, token):
function handle_error_space (line 196) | def handle_error_space(state, token):
function handle_error_linecont (line 207) | def handle_error_linecont(state, token):
function handle_error_token (line 220) | def handle_error_token(state, token):
function handle_ignore (line 234) | def handle_ignore(state, token):
function handle_double_amps (line 239) | def handle_double_amps(state, token):
function handle_double_pipe (line 243) | def handle_double_pipe(state, token):
function handle_redirect (line 247) | def handle_redirect(state, token):
function _make_matcher_handler (line 265) | def _make_matcher_handler(tok, typ, pymode, ender, handlers):
function special_handlers (line 285) | def special_handlers():
function handle_token (line 326) | def handle_token(state, token):
function get_tokens (line 365) | def get_tokens(s):
function _new_token (line 399) | def _new_token(type, value, pos):
class Lexer (line 407) | class Lexer(object):
method __init__ (line 412) | def __init__(self):
method build (line 428) | def build(self, **kwargs):
method reset (line 432) | def reset(self):
method input (line 435) | def input(self, s):
method token (line 439) | def token(self):
method __iter__ (line 445) | def __iter__(self):
method split (line 451) | def split(self, s):
method tokens (line 482) | def tokens(self):
FILE: xonsh/macutils.py
function sysctlbyname (line 7) | def sysctlbyname(name, return_str=True):
FILE: xonsh/main.py
function get_setproctitle (line 102) | def get_setproctitle():
function path_argument (line 111) | def path_argument(s):
function parser (line 125) | def parser():
function _pprint_displayhook (line 248) | def _pprint_displayhook(value):
class XonshMode (line 269) | class XonshMode(enum.Enum):
function start_services (line 276) | def start_services(shell_kwargs, args):
function premain (line 309) | def premain(argv=None):
function _failback_to_other_shells (line 367) | def _failback_to_other_shells(args, err):
function main (line 401) | def main(argv=None):
function main_xonsh (line 410) | def main_xonsh(args):
function postmain (line 464) | def postmain(args=None):
function main_context (line 472) | def main_context(argv=None):
function setup (line 482) | def setup(
FILE: xonsh/openpy.py
function source_to_unicode (line 29) | def source_to_unicode(txt, errors="replace", skip_encoding_cookie=True):
function strip_encoding_cookie (line 56) | def strip_encoding_cookie(filelike):
function read_py_file (line 74) | def read_py_file(filename, skip_encoding_cookie=True):
function read_py_url (line 97) | def read_py_url(url, errors="replace", skip_encoding_cookie=True):
function _list_readline (line 126) | def _list_readline(x):
FILE: xonsh/parser.py
function Parser (line 8) | def Parser():
FILE: xonsh/parsers/base.py
function RE_FSTR_EVAL_CHARS (line 30) | def RE_FSTR_EVAL_CHARS():
class Location (line 34) | class Location(object):
method __init__ (line 37) | def __init__(self, fname, lineno, column=None):
method __str__ (line 43) | def __str__(self):
function ensure_has_elts (line 50) | def ensure_has_elts(x, lineno=None, col_offset=None):
function empty_list (line 61) | def empty_list(lineno=None, col=None):
function binop (line 66) | def binop(x, op, y, lineno=None, col=None):
function call_split_lines (line 73) | def call_split_lines(x, lineno=None, col=None):
function ensure_list_from_str_or_list (line 90) | def ensure_list_from_str_or_list(x, lineno=None, col=None):
function xonsh_help (line 116) | def xonsh_help(x, lineno=None, col=None):
function xonsh_superhelp (line 121) | def xonsh_superhelp(x, lineno=None, col=None):
function xonsh_pathsearch (line 126) | def xonsh_pathsearch(pattern, pymode=False, lineno=None, col=None):
function load_ctx (line 151) | def load_ctx(x):
function store_ctx (line 163) | def store_ctx(x):
function del_ctx (line 175) | def del_ctx(x):
function empty_list_if_newline (line 187) | def empty_list_if_newline(x):
function lopen_loc (line 191) | def lopen_loc(x):
function hasglobstar (line 200) | def hasglobstar(x):
function _wrap_fstr_field (line 214) | def _wrap_fstr_field(field, spec, conv):
function eval_fstr_fields (line 224) | def eval_fstr_fields(fstring, prefix, filename=None):
class YaccLoader (line 257) | class YaccLoader(Thread):
method __init__ (line 260) | def __init__(self, parser, yacc_kwargs, *args, **kwargs):
method run (line 267) | def run(self):
class BaseParser (line 271) | class BaseParser(object):
method __init__ (line 274) | def __init__(
method reset (line 513) | def reset(self):
method parse (line 520) | def parse(self, s, filename="<code>", mode="exec", debug_level=0):
method _lexer_errfunc (line 554) | def _lexer_errfunc(self, msg, line, column):
method _yacc_lookahead_token (line 557) | def _yacc_lookahead_token(self):
method _opt_rule (line 561) | def _opt_rule(self, rulename):
method _list_rule (line 573) | def _list_rule(self, rulename):
method _tok_rule (line 587) | def _tok_rule(self, rulename):
method currloc (line 606) | def currloc(self, lineno, column=None):
method expr (line 610) | def expr(self, p):
method token_col (line 617) | def token_col(self, t):
method lineno (line 622) | def lineno(self):
method col (line 629) | def col(self):
method lines (line 638) | def lines(self):
method source_slice (line 643) | def source_slice(self, start, stop):
method _parse_error (line 660) | def _parse_error(self, msg, loc):
method p_start_symbols (line 697) | def p_start_symbols(self, p):
method p_single_input (line 705) | def p_single_input(self, p):
method p_file_input (line 712) | def p_file_input(self, p):
method p_file_stmts_nl (line 716) | def p_file_stmts_nl(self, p):
method p_file_stmts_files (line 721) | def p_file_stmts_files(self, p):
method p_newline_or_stmt (line 727) | def p_newline_or_stmt(self, p):
method p_newlines (line 733) | def p_newlines(self, p):
method p_eval_input (line 739) | def p_eval_input(self, p):
method p_func_call (line 745) | def p_func_call(self, p):
method p_attr_period_name (line 749) | def p_attr_period_name(self, p):
method p_attr_name_alone (line 753) | def p_attr_name_alone(self, p):
method p_attr_name_with (line 760) | def p_attr_name_with(self, p):
method p_decorator_no_call (line 784) | def p_decorator_no_call(self, p):
method p_decorator_call (line 788) | def p_decorator_call(self, p):
method p_decorators (line 809) | def p_decorators(self, p):
method p_decorated (line 815) | def p_decorated(self, p):
method p_rarrow_test (line 831) | def p_rarrow_test(self, p):
method p_funcdef (line 835) | def p_funcdef(self, p):
method p_parameters (line 848) | def p_parameters(self, p):
method p_equals_test (line 862) | def p_equals_test(self, p):
method p_typedargslist_kwarg (line 866) | def p_typedargslist_kwarg(self, p):
method p_typedargslist_times4_tfpdef (line 872) | def p_typedargslist_times4_tfpdef(self, p):
method p_typedargslist_times4_comma (line 881) | def p_typedargslist_times4_comma(self, p):
method p_typedargslist_times5_tdpdef (line 889) | def p_typedargslist_times5_tdpdef(self, p):
method p_typedargslist_times5_comma (line 898) | def p_typedargslist_times5_comma(self, p):
method p_typedargslist_t5 (line 907) | def p_typedargslist_t5(self, p):
method p_typedargslist_t7 (line 916) | def p_typedargslist_t7(self, p):
method p_typedargslist_t8 (line 925) | def p_typedargslist_t8(self, p):
method p_typedargslist_t10 (line 934) | def p_typedargslist_t10(self, p):
method p_typedargslist_t11 (line 944) | def p_typedargslist_t11(self, p):
method p_colon_test (line 959) | def p_colon_test(self, p):
method p_tfpdef (line 963) | def p_tfpdef(self, p):
method p_comma_tfpdef_empty (line 971) | def p_comma_tfpdef_empty(self, p):
method p_comma_tfpdef_args (line 975) | def p_comma_tfpdef_args(self, p):
method p_comma_pow_tfpdef (line 979) | def p_comma_pow_tfpdef(self, p):
method _set_args_def (line 983) | def _set_args_def(self, argmts, vals, kwargs=False):
method _set_regular_args (line 998) | def _set_regular_args(self, p0, p1, p2, p3, p4):
method _set_var_args (line 1016) | def _set_var_args(self, p0, vararg, kwargs):
method p_varargslist_kwargs (line 1030) | def p_varargslist_kwargs(self, p):
method p_varargslist_times4 (line 1036) | def p_varargslist_times4(self, p):
method p_varargslist_times5 (line 1044) | def p_varargslist_times5(self, p):
method p_varargslist_v5 (line 1053) | def p_varargslist_v5(self, p):
method p_varargslist_v7 (line 1062) | def p_varargslist_v7(self, p):
method p_varargslist_v8 (line 1071) | def p_varargslist_v8(self, p):
method p_varargslist_v10 (line 1081) | def p_varargslist_v10(self, p):
method p_varargslist_v11 (line 1091) | def p_varargslist_v11(self, p):
method p_vfpdef (line 1105) | def p_vfpdef(self, p):
method p_comma_vfpdef_empty (line 1113) | def p_comma_vfpdef_empty(self, p):
method p_comma_vfpdef_value (line 1117) | def p_comma_vfpdef_value(self, p):
method p_comma_pow_vfpdef (line 1121) | def p_comma_pow_vfpdef(self, p):
method p_stmt (line 1125) | def p_stmt(self, p):
method p_stmt_list (line 1131) | def p_stmt_list(self, p):
method p_semi_opt (line 1140) | def p_semi_opt(self, p):
method p_semi_small_stmt (line 1147) | def p_semi_small_stmt(self, p):
method p_simple_stmt_single (line 1151) | def p_simple_stmt_single(self, p):
method p_simple_stmt_many (line 1155) | def p_simple_stmt_many(self, p):
method p_small_stmt (line 1159) | def p_small_stmt(self, p):
method p_expr_stmt_testlist_assign (line 1187) | def p_expr_stmt_testlist_assign(self, p):
method p_expr_stmt_augassign (line 1207) | def p_expr_stmt_augassign(self, p):
method store_star_expr (line 1223) | def store_star_expr(self, p1, p2, targs, rhs):
method p_expr_stmt_star5 (line 1248) | def p_expr_stmt_star5(self, p):
method p_expr_stmt_star6 (line 1253) | def p_expr_stmt_star6(self, p):
method p_test_comma (line 1258) | def p_test_comma(self, p):
method p_comma_opt (line 1262) | def p_comma_opt(self, p):
method p_test_or_star_expr (line 1269) | def p_test_or_star_expr(self, p):
method p_comma_test_or_star_expr (line 1275) | def p_comma_test_or_star_expr(self, p):
method p_testlist_star_expr (line 1279) | def p_testlist_star_expr(self, p):
method p_augassign (line 1306) | def p_augassign(self, p):
method p_yield_expr_or_testlist (line 1323) | def p_yield_expr_or_testlist(self, p):
method p_equals_yield_expr_or_testlist (line 1329) | def p_equals_yield_expr_or_testlist(self, p):
method p_del_stmt (line 1337) | def p_del_stmt(self, p):
method p_pass_stmt (line 1348) | def p_pass_stmt(self, p):
method p_flow_stmt (line 1352) | def p_flow_stmt(self, p):
method p_break_stmt (line 1361) | def p_break_stmt(self, p):
method p_continue_stmt (line 1365) | def p_continue_stmt(self, p):
method p_return_stmt (line 1369) | def p_return_stmt(self, p):
method p_yield_stmt (line 1374) | def p_yield_stmt(self, p):
method p_raise_stmt_r1 (line 1378) | def p_raise_stmt_r1(self, p):
method p_raise_stmt_r2 (line 1383) | def p_raise_stmt_r2(self, p):
method p_raise_stmt_r3 (line 1388) | def p_raise_stmt_r3(self, p):
method p_import_stmt (line 1393) | def p_import_stmt(self, p):
method p_import_name (line 1399) | def p_import_name(self, p):
method p_import_from_pre_f3 (line 1405) | def p_import_from_pre_f3(self, p):
method p_import_from_pre_f4 (line 1410) | def p_import_from_pre_f4(self, p):
method p_import_from_post_times (line 1416) | def p_import_from_post_times(self, p):
method p_import_from_post_as (line 1420) | def p_import_from_post_as(self, p):
method p_import_from_post_paren (line 1424) | def p_import_from_post_paren(self, p):
method p_import_from (line 1428) | def p_import_from(self, p):
method p_period_or_ellipsis (line 1440) | def p_period_or_ellipsis(self, p):
method p_as_name (line 1446) | def p_as_name(self, p):
method p_import_as_name (line 1450) | def p_import_as_name(self, p):
method p_comma_import_as_name (line 1454) | def p_comma_import_as_name(self, p):
method p_comma_import_as_name_tail (line 1459) | def p_comma_import_as_name_tail(self, p):
method p_dotted_as_name (line 1463) | def p_dotted_as_name(self, p):
method p_comma_dotted_as_name (line 1468) | def p_comma_dotted_as_name(self, p):
method p_import_as_names (line 1472) | def p_import_as_names(self, p):
method p_dotted_as_names (line 1480) | def p_dotted_as_names(self, p):
method p_period_name (line 1488) | def p_period_name(self, p):
method p_dotted_name (line 1492) | def p_dotted_name(self, p):
method p_comma_name (line 1498) | def p_comma_name(self, p):
method p_global_stmt (line 1502) | def p_global_stmt(self, p):
method p_nonlocal_stmt (line 1510) | def p_nonlocal_stmt(self, p):
method p_comma_test (line 1518) | def p_comma_test(self, p):
method p_assert_stmt (line 1522) | def p_assert_stmt(self, p):
method p_compound_stmt (line 1531) | def p_compound_stmt(self, p):
method p_elif_part (line 1543) | def p_elif_part(self, p):
method p_else_part (line 1556) | def p_else_part(self, p):
method p_if_stmt (line 1560) | def p_if_stmt(self, p):
method p_while_stmt (line 1578) | def p_while_stmt(self, p):
method p_for_stmt (line 1589) | def p_for_stmt(self, p):
method p_except_part (line 1618) | def p_except_part(self, p):
method p_finally_part (line 1624) | def p_finally_part(self, p):
method p_try_stmt_t5 (line 1628) | def p_try_stmt_t5(self, p):
method p_try_stmt_t6 (line 1642) | def p_try_stmt_t6(self, p):
method p_try_stmt_t7 (line 1656) | def p_try_stmt_t7(self, p):
method p_with_stmt_w5 (line 1670) | def p_with_stmt_w5(self, p):
method p_with_stmt_p6 (line 1677) | def p_with_stmt_p6(self, p):
method p_with_bang_stmt_single_suite (line 1686) | def p_with_bang_stmt_single_suite(self, p):
method p_with_bang_stmt_many_suite (line 1698) | def p_with_bang_stmt_many_suite(self, p):
method p_as_expr (line 1716) | def p_as_expr(self, p):
method p_with_item (line 1722) | def p_with_item(self, p):
method p_comma_with_item (line 1729) | def p_comma_with_item(self, p):
method p_except_clause_e2 (line 1733) | def p_except_clause_e2(self, p):
method p_except_clause (line 1740) | def p_except_clause(self, p):
method p_suite (line 1747) | def p_suite(self, p):
method p_rawsuite_indent (line 1753) | def p_rawsuite_indent(self, p):
method p_rawsuite_simple_stmt (line 1762) | def p_rawsuite_simple_stmt(self, p):
method _attach_nodedent_base_rules (line 1770) | def _attach_nodedent_base_rules(self):
method p_nodedent_base (line 1777) | def p_nodedent_base(self, p):
method p_nodedent_any (line 1781) | def p_nodedent_any(self, p):
method p_nodedent_many (line 1785) | def p_nodedent_many(self, p):
method p_any_dedent_tok (line 1789) | def p_any_dedent_tok(self, p):
method p_any_dedent_toks (line 1795) | def p_any_dedent_toks(self, p):
method _attach_nonewline_base_rules (line 1801) | def _attach_nonewline_base_rules(self):
method p_nonewline_base (line 1823) | def p_nonewline_base(self, p):
method p_nonewline_any (line 1827) | def p_nonewline_any(self, p):
method p_nonewline_many (line 1831) | def p_nonewline_many(self, p):
method p_test_ol (line 1835) | def p_test_ol(self, p):
method p_test_o5 (line 1841) | def p_test_o5(self, p):
method p_test_nocond (line 1847) | def p_test_nocond(self, p):
method p_lambdef (line 1853) | def p_lambdef(self, p):
method p_lambdef_nocond (line 1870) | def p_lambdef_nocond(self, p):
method p_or_test (line 1874) | def p_or_test(self, p):
method p_or_and_test (line 1889) | def p_or_and_test(self, p):
method p_and_test (line 1893) | def p_and_test(self, p):
method p_and_not_test (line 1908) | def p_and_not_test(self, p):
method p_not_test_not (line 1912) | def p_not_test_not(self, p):
method p_not_test (line 1918) | def p_not_test(self, p):
method p_comparison (line 1922) | def p_comparison(self, p):
method p_comp_op_expr (line 1937) | def p_comp_op_expr(self, p):
method p_comp_op_monograph (line 1954) | def p_comp_op_monograph(self, p):
method p_comp_op_digraph (line 1966) | def p_comp_op_digraph(self, p):
method p_star_expr (line 1972) | def p_star_expr(self, p):
method _binop_combine (line 1979) | def _binop_combine(self, p1, p2):
method p_expr (line 1999) | def p_expr(self, p):
method p_pipe_xor_expr (line 2005) | def p_pipe_xor_expr(self, p):
method p_xor_expr (line 2018) | def p_xor_expr(self, p):
method p_xor_and_expr (line 2022) | def p_xor_and_expr(self, p):
method p_and_expr (line 2035) | def p_and_expr(self, p):
method p_ampersand_shift_expr (line 2039) | def p_ampersand_shift_expr(self, p):
method p_shift_expr (line 2052) | def p_shift_expr(self, p):
method p_shift_arith_expr (line 2056) | def p_shift_arith_expr(self, p):
method p_arith_expr_single (line 2068) | def p_arith_expr_single(self, p):
method p_arith_expr_many (line 2072) | def p_arith_expr_many(self, p):
method p_pm_term (line 2101) | def p_pm_term(self, p):
method p_term (line 2109) | def p_term(self, p):
method p_op_factor (line 2130) | def p_op_factor(self, p):
method p_factor_power (line 2148) | def p_factor_power(self, p):
method p_factor_unary (line 2152) | def p_factor_unary(self, p):
method p_power_atom (line 2160) | def p_power_atom(self, p):
method p_power (line 2164) | def p_power(self, p):
method p_yield_expr_or_testlist_comp (line 2175) | def p_yield_expr_or_testlist_comp(self, p):
method _list_or_elts_if_not_real_tuple (line 2181) | def _list_or_elts_if_not_real_tuple(self, x):
method apply_trailers (line 2190) | def apply_trailers(self, leader, trailers):
method p_atom_expr (line 2241) | def p_atom_expr(self, p):
method p_atom_lparen (line 2248) | def p_atom_lparen(self, p):
method p_atom_lbraket (line 2269) | def p_atom_lbraket(self, p):
method p_atom_lbrace (line 2301) | def p_atom_lbrace(self, p):
method p_atom_ns (line 2318) | def p_atom_ns(self, p):
method p_atom_name (line 2324) | def p_atom_name(self, p):
method p_atom_ellip (line 2331) | def p_atom_ellip(self, p):
method p_atom_none (line 2336) | def p_atom_none(self, p):
method p_atom_true (line 2341) | def p_atom_true(self, p):
method p_atom_false (line 2346) | def p_atom_false(self, p):
method p_atom_pathsearch (line 2351) | def p_atom_pathsearch(self, p):
method p_atom_dname (line 2355) | def p_atom_dname(self, p):
method p_atom_fistful_of_dollars (line 2359) | def p_atom_fistful_of_dollars(self, p):
method p_atom_bang_empty_fistful_of_dollars (line 2368) | def p_atom_bang_empty_fistful_of_dollars(self, p):
method p_atom_bang_fistful_of_dollars (line 2377) | def p_atom_bang_fistful_of_dollars(self, p):
method _attach_nocloser_base_rules (line 2386) | def _attach_nocloser_base_rules(self):
method p_nocloser_base (line 2407) | def p_nocloser_base(self, p):
method p_nocloser_any (line 2411) | def p_nocloser_any(self, p):
method p_nocloser_many (line 2415) | def p_nocloser_many(self, p):
method p_string_literal (line 2419) | def p_string_literal(self, p):
method p_string_literal_list (line 2454) | def p_string_literal_list(self, p):
method p_number (line 2462) | def p_number(self, p):
method p_testlist_comp_comp (line 2471) | def p_testlist_comp_comp(self, p):
method p_testlist_comp_comma (line 2478) | def p_testlist_comp_comma(self, p):
method p_testlist_comp_many (line 2488) | def p_testlist_comp_many(self, p):
method p_trailer_lparen (line 2495) | def p_trailer_lparen(self, p):
method p_trailer_bang_lparen (line 2499) | def p_trailer_bang_lparen(self, p):
method p_trailer_p3 (line 2528) | def p_trailer_p3(self, p):
method p_trailer_quest (line 2534) | def p_trailer_quest(self, p):
method _attach_nocomma_tok_rules (line 2540) | def _attach_nocomma_tok_rules(self):
method p_nocomma_tok (line 2570) | def p_nocomma_tok(self, p):
method p_any_raw_tok (line 2574) | def p_any_raw_tok(self, p):
method p_any_raw_toks_one (line 2580) | def p_any_raw_toks_one(self, p):
method p_any_raw_toks_many (line 2584) | def p_any_raw_toks_many(self, p):
method p_nocomma_part_tok (line 2588) | def p_nocomma_part_tok(self, p):
method p_any_nested_raw (line 2592) | def p_any_nested_raw(self, p):
method p_nocomma_part_any (line 2606) | def p_nocomma_part_any(self, p):
method p_nocomma_base (line 2610) | def p_nocomma_base(self, p):
method p_nocomma_append (line 2614) | def p_nocomma_append(self, p):
method p_comma_nocomma (line 2618) | def p_comma_nocomma(self, p):
method p_macroarglist_single (line 2623) | def p_macroarglist_single(self, p):
method p_macroarglist_many (line 2627) | def p_macroarglist_many(self, p):
method p_subscriptlist (line 2631) | def p_subscriptlist(self, p):
method p_comma_subscript (line 2647) | def p_comma_subscript(self, p):
method p_subscript_test (line 2651) | def p_subscript_test(self, p):
method p_subscript_tok (line 2656) | def p_subscript_tok(self, p):
method p_sliceop (line 2666) | def p_sliceop(self, p):
method p_expr_or_star_expr (line 2670) | def p_expr_or_star_expr(self, p):
method p_comma_expr_or_star_expr (line 2676) | def p_comma_expr_or_star_expr(self, p):
method p_exprlist_e3 (line 2680) | def p_exprlist_e3(self, p):
method p_exprlist_many (line 2684) | def p_exprlist_many(self, p):
method p_testlist_test (line 2690) | def p_testlist_test(self, p):
method p_testlist_single (line 2699) | def p_testlist_single(self, p):
method p_testlist_many (line 2712) | def p_testlist_many(self, p):
method p_comma_item (line 2729) | def p_comma_item(self, p):
method p_dictorsetmaker_t6 (line 2736) | def p_dictorsetmaker_t6(self, p):
method p_dictorsetmaker_i4 (line 2749) | def p_dictorsetmaker_i4(self, p):
method p_dictorsetmaker_t4_dict (line 2762) | def p_dictorsetmaker_t4_dict(self, p):
method p_dictorsetmaker_t4_set (line 2771) | def p_dictorsetmaker_t4_set(self, p):
method p_dictorsetmaker_test_comma (line 2777) | def p_dictorsetmaker_test_comma(self, p):
method p_dictorsetmaker_testlist (line 2784) | def p_dictorsetmaker_testlist(self, p):
method p_dictorsetmaker_comp (line 2791) | def p_dictorsetmaker_comp(self, p):
method p_classdef (line 2810) | def p_classdef(self, p):
method p_comma_argument (line 2827) | def p_comma_argument(self, p):
method p_comp_iter (line 2831) | def p_comp_iter(self, p):
method p_comp_for (line 2837) | def p_comp_for(self, p):
method p_comp_if (line 2853) | def p_comp_if(self, p):
method p_yield_expr (line 2861) | def p_yield_expr(self, p):
method p_yield_arg_from (line 2872) | def p_yield_arg_from(self, p):
method p_yield_arg_testlist (line 2876) | def p_yield_arg_testlist(self, p):
method _dollar_rules (line 2884) | def _dollar_rules(self, p):
method _envvar_getter_by_name (line 2921) | def _envvar_getter_by_name(self, var, lineno=None, col=None):
method _envvar_by_name (line 2939) | def _envvar_by_name(self, var, lineno=None, col=None):
method _subproc_cliargs (line 2947) | def _subproc_cliargs(self, args, lineno=None, col=None):
method p_pipe (line 2975) | def p_pipe(self, p):
method p_subproc_s2 (line 2983) | def p_subproc_s2(self, p):
method p_subproc_amp (line 2990) | def p_subproc_amp(self, p):
method p_subproc_pipe (line 2995) | def p_subproc_pipe(self, p):
method p_subproc_atoms_single (line 3006) | def p_subproc_atoms_single(self, p):
method p_subproc_atoms_many (line 3010) | def p_subproc_atoms_many(self, p):
method p_subproc_atoms_subshell (line 3016) | def p_subproc_atoms_subshell(self, p):
method _append_subproc_bang_empty (line 3038) | def _append_subproc_bang_empty(self, p):
method _append_subproc_bang (line 3044) | def _append_subproc_bang(self, p):
method p_subproc_atom_uncaptured (line 3055) | def p_subproc_atom_uncaptured(self, p):
method p_subproc_atom_uncaptured_bang_empty (line 3064) | def p_subproc_atom_uncaptured_bang_empty(self, p):
method p_subproc_atom_uncaptured_bang (line 3069) | def p_subproc_atom_uncaptured_bang(self, p):
method p_subproc_atom_captured_stdout (line 3074) | def p_subproc_atom_captured_stdout(self, p):
method p_subproc_atom_captured_stdout_bang_empty (line 3086) | def p_subproc_atom_captured_stdout_bang_empty(self, p):
method p_subproc_atom_captured_stdout_bang (line 3091) | def p_subproc_atom_captured_stdout_bang(self, p):
method p_subproc_atom_pyenv_lookup (line 3096) | def p_subproc_atom_pyenv_lookup(self, p):
method p_subproc_atom_pyeval (line 3116) | def p_subproc_atom_pyeval(self, p):
method p_subproc_atom_subproc_inject (line 3130) | def p_subproc_atom_subproc_inject(self, p):
method p_subproc_atom_subproc_inject_bang_empty (line 3139) | def p_subproc_atom_subproc_inject_bang_empty(self, p):
method p_subproc_atom_subproc_inject_bang (line 3144) | def p_subproc_atom_subproc_inject_bang(self, p):
method p_subproc_atom_redirect (line 3149) | def p_subproc_atom_redirect(self, p):
method p_subproc_atom_re (line 3159) | def p_subproc_atom_re(self, p):
method p_subproc_atom_str (line 3165) | def p_subproc_atom_str(self, p):
method p_subproc_atom_arg (line 3173) | def p_subproc_atom_arg(self, p):
method p_subproc_arg_single (line 3199) | def p_subproc_arg_single(self, p):
method p_subproc_arg_many (line 3203) | def p_subproc_arg_many(self, p):
method _attach_subproc_arg_part_rules (line 3223) | def _attach_subproc_arg_part_rules(self):
method p_subproc_arg_part (line 3258) | def p_subproc_arg_part(self, p):
method p_test_comma_combine (line 3268) | def p_test_comma_combine(self, p):
method p_empty (line 3276) | def p_empty(self, p):
method p_error (line 3280) | def p_error(self, p):
FILE: xonsh/parsers/context_check.py
function _not_assignable (line 8) | def _not_assignable(x, augassign=False):
function check_contexts (line 52) | def check_contexts(tree):
class ContextCheckingVisitor (line 61) | class ContextCheckingVisitor(ast.NodeVisitor):
method __init__ (line 62) | def __init__(self):
method visit_Delete (line 65) | def visit_Delete(self, node):
method visit_Assign (line 73) | def visit_Assign(self, node):
method visit_AugAssign (line 81) | def visit_AugAssign(self, node):
FILE: xonsh/parsers/v34.py
class Parser (line 7) | class Parser(BaseParser):
method __init__ (line 10) | def __init__(
method p_classdef_or_funcdef (line 52) | def p_classdef_or_funcdef(self, p):
method p_item (line 58) | def p_item(self, p):
method _set_arg (line 69) | def _set_arg(self, args, arg, ensure_kw=False):
method p_arglist (line 77) | def p_arglist(self, p):
method p_argument_comma (line 125) | def p_argument_comma(self, p):
method p_argument (line 129) | def p_argument(self, p):
FILE: xonsh/parsers/v35.py
class Parser (line 7) | class Parser(BaseParser):
method __init__ (line 10) | def __init__(
method p_classdef_or_funcdef (line 47) | def p_classdef_or_funcdef(self, p):
method p_async_funcdef (line 54) | def p_async_funcdef(self, p):
method p_async_compound_stmt (line 60) | def p_async_compound_stmt(self, p):
method p_async_for_stmt (line 64) | def p_async_for_stmt(self, p):
method p_async_with_stmt (line 69) | def p_async_with_stmt(self, p):
method p_atom_expr_await (line 74) | def p_atom_expr_await(self, p):
method p_async_stmt (line 81) | def p_async_stmt(self, p):
method p_item_test (line 88) | def p_item_test(self, p):
method p_item_pow (line 92) | def p_item_pow(self, p):
method _set_arg (line 96) | def _set_arg(self, args, arg, ensure_kw=False):
method p_arglist_single (line 104) | def p_arglist_single(self, p):
method p_arglist_many (line 110) | def p_arglist_many(self, p):
method p_argument_test_or_star (line 127) | def p_argument_test_or_star(self, p):
method p_argument_kwargs (line 131) | def p_argument_kwargs(self, p):
method p_argument_args (line 135) | def p_argument_args(self, p):
method p_argument (line 139) | def p_argument(self, p):
method p_argument_eq (line 146) | def p_argument_eq(self, p):
FILE: xonsh/parsers/v36.py
class Parser (line 8) | class Parser(ThreeFiveParser):
method p_comp_for (line 11) | def p_comp_for(self, p):
method p_expr_stmt_annassign (line 28) | def p_expr_stmt_annassign(self, p):
FILE: xonsh/platform.py
function distro (line 28) | def distro():
function ON_BSD (line 68) | def ON_BSD():
function ON_BEOS (line 74) | def ON_BEOS():
function ON_WSL (line 80) | def ON_WSL():
function PYTHON_VERSION_INFO_BYTES (line 94) | def PYTHON_VERSION_INFO_BYTES():
function HAS_PYGMENTS (line 114) | def HAS_PYGMENTS():
function pygments_version (line 121) | def pygments_version():
function pygments_version_info (line 133) | def pygments_version_info():
function has_prompt_toolkit (line 142) | def has_prompt_toolkit():
function ptk_version (line 149) | def ptk_version():
function ptk_version_info (line 160) | def ptk_version_info():
function ptk_above_min_supported (line 169) | def ptk_above_min_supported():
function ptk_shell_type (line 175) | def ptk_shell_type():
function win_ansi_support (line 184) | def win_ansi_support():
function ptk_below_max_supported (line 196) | def ptk_below_max_supported():
function best_shell_type (line 202) | def best_shell_type():
function is_readline_available (line 212) | def is_readline_available():
function seps (line 219) | def seps():
function pathsplit (line 227) | def pathsplit(p):
function pathbasename (line 240) | def pathbasename(p):
function expanduser (line 248) | def expanduser():
function windows_expanduser (line 256) | def windows_expanduser(path):
function githash (line 286) | def githash():
class DirEntry (line 312) | class DirEntry:
method __init__ (line 313) | def __init__(self, directory, name):
method inode (line 319) | def inode(self):
method is_dir (line 322) | def is_dir(self, *, follow_symlinks=True):
method is_file (line 328) | def is_file(self, *, follow_symlinks=True):
method stat (line 334) | def stat(self, *, follow_symlinks=True):
function scandir (line 337) | def scandir(path):
function linux_distro (line 352) | def linux_distro():
function git_for_windows_path (line 376) | def git_for_windows_path():
function windows_bash_command (line 389) | def windows_bash_command():
class OSEnvironCasePreserving (line 427) | class OSEnvironCasePreserving(cabc.MutableMapping):
method __init__ (line 434) | def __init__(self):
method _sync (line 439) | def _sync(self):
method __contains__ (line 449) | def __contains__(self, k):
method __len__ (line 453) | def __len__(self):
method __iter__ (line 457) | def __iter__(self):
method __getitem__ (line 461) | def __getitem__(self, k):
method __setitem__ (line 465) | def __setitem__(self, k, v):
method __delitem__ (line 470) | def __delitem__(self, k):
method getkey_actual_case (line 476) | def getkey_actual_case(self, k):
function os_environ (line 482) | def os_environ():
function bash_command (line 495) | def bash_command():
function BASH_COMPLETIONS_DEFAULT (line 505) | def BASH_COMPLETIONS_DEFAULT():
function PATH_DEFAULT (line 534) | def PATH_DEFAULT():
function LIBC (line 576) | def LIBC():
FILE: xonsh/ply/doc/makedoc.py
function getheadingname (line 27) | def getheadingname(m):
FILE: xonsh/ply/example/BASIC/basiclex.py
function t_REM (line 20) | def t_REM(t):
function t_ID (line 25) | def t_ID(t):
function t_NEWLINE (line 51) | def t_NEWLINE(t):
function t_error (line 57) | def t_error(t):
FILE: xonsh/ply/example/BASIC/basinterp.py
class BasicInterpreter (line 9) | class BasicInterpreter:
method __init__ (line 13) | def __init__(self, prog):
method collect_data (line 30) | def collect_data(self):
method check_end (line 38) | def check_end(self):
method check_loops (line 52) | def check_loops(self):
method eval (line 70) | def eval(self, expr):
method releval (line 127) | def releval(self, expr):
method assign (line 168) | def assign(self, target, value):
method goto (line 198) | def goto(self, linenum):
method run (line 206) | def run(self):
method expr_str (line 378) | def expr_str(self, expr):
method relexpr_str (line 392) | def relexpr_str(self, expr):
method var_str (line 395) | def var_str(self, var):
method list (line 404) | def list(self):
method new (line 483) | def new(self):
method add_statements (line 487) | def add_statements(self, prog):
method del_line (line 492) | def del_line(self, lineno):
FILE: xonsh/ply/example/BASIC/basparse.py
function p_program (line 20) | def p_program(p):
function p_program_error (line 40) | def p_program_error(p):
function p_statement (line 48) | def p_statement(p):
function p_statement_interactive (line 61) | def p_statement_interactive(p):
function p_statement_blank (line 70) | def p_statement_blank(p):
function p_statement_bad (line 77) | def p_statement_bad(p):
function p_statement_newline (line 86) | def p_statement_newline(p):
function p_command_let (line 93) | def p_command_let(p):
function p_command_let_bad (line 98) | def p_command_let_bad(p):
function p_command_read (line 105) | def p_command_read(p):
function p_command_read_bad (line 110) | def p_command_read_bad(p):
function p_command_data (line 117) | def p_command_data(p):
function p_command_data_bad (line 122) | def p_command_data_bad(p):
function p_command_print (line 129) | def p_command_print(p):
function p_command_print_bad (line 134) | def p_command_print_bad(p):
function p_optend (line 141) | def p_optend(p):
function p_command_print_empty (line 153) | def p_command_print_empty(p):
function p_command_goto (line 160) | def p_command_goto(p):
function p_command_goto_bad (line 165) | def p_command_goto_bad(p):
function p_command_if (line 172) | def p_command_if(p):
function p_command_if_bad (line 177) | def p_command_if_bad(p):
function p_command_if_bad2 (line 182) | def p_command_if_bad2(p):
function p_command_for (line 189) | def p_command_for(p):
function p_command_for_bad_initial (line 194) | def p_command_for_bad_initial(p):
function p_command_for_bad_final (line 199) | def p_command_for_bad_final(p):
function p_command_for_bad_step (line 204) | def p_command_for_bad_step(p):
function p_optstep (line 211) | def p_optstep(p):
function p_command_next (line 222) | def p_command_next(p):
function p_command_next_bad (line 228) | def p_command_next_bad(p):
function p_command_end (line 235) | def p_command_end(p):
function p_command_rem (line 242) | def p_command_rem(p):
function p_command_stop (line 249) | def p_command_stop(p):
function p_command_def (line 256) | def p_command_def(p):
function p_command_def_bad_rhs (line 261) | def p_command_def_bad_rhs(p):
function p_command_def_bad_arg (line 266) | def p_command_def_bad_arg(p):
function p_command_gosub (line 273) | def p_command_gosub(p):
function p_command_gosub_bad (line 278) | def p_command_gosub_bad(p):
function p_command_return (line 285) | def p_command_return(p):
function p_command_dim (line 292) | def p_command_dim(p):
function p_command_dim_bad (line 297) | def p_command_dim_bad(p):
function p_dimlist (line 304) | def p_dimlist(p):
function p_dimitem_single (line 316) | def p_dimitem_single(p):
function p_dimitem_double (line 321) | def p_dimitem_double(p):
function p_expr_binary (line 328) | def p_expr_binary(p):
function p_expr_number (line 338) | def p_expr_number(p):
function p_expr_variable (line 344) | def p_expr_variable(p):
function p_expr_group (line 349) | def p_expr_group(p):
function p_expr_unary (line 354) | def p_expr_unary(p):
function p_relexpr (line 361) | def p_relexpr(p):
function p_variable (line 373) | def p_variable(p):
function p_varlist (line 387) | def p_varlist(p):
function p_numlist (line 399) | def p_numlist(p):
function p_number (line 412) | def p_number(p):
function p_number_signed (line 420) | def p_number_signed(p):
function p_plist (line 429) | def p_plist(p):
function p_item_string (line 439) | def p_item_string(p):
function p_item_string_expr (line 444) | def p_item_string_expr(p):
function p_item_expr (line 449) | def p_item_expr(p):
function p_empty (line 456) | def p_empty(p):
function p_error (line 462) | def p_error(p):
function parse (line 469) | def parse(data, debug=0):
FILE: xonsh/ply/example/GardenSnake/GardenSnake.py
function t_NUMBER (line 78) | def t_NUMBER(t):
function t_STRING (line 84) | def t_STRING(t):
function t_NAME (line 110) | def t_NAME(t):
function t_comment (line 120) | def t_comment(t):
function t_WS (line 126) | def t_WS(t):
function t_newline (line 136) | def t_newline(t):
function t_LPAR (line 144) | def t_LPAR(t):
function t_RPAR (line 150) | def t_RPAR(t):
function t_error (line 157) | def t_error(t):
function track_tokens_filter (line 184) | def track_tokens_filter(lexer, tokens):
function _new_token (line 220) | def _new_token(type, lineno):
function DEDENT (line 230) | def DEDENT(lineno):
function INDENT (line 236) | def INDENT(lineno):
function indentation_filter (line 241) | def indentation_filter(tokens):
function filter (line 319) | def filter(lexer, add_endmarker=True):
class IndentLexer (line 335) | class IndentLexer(object):
method __init__ (line 337) | def __init__(self, debug=0, optimize=0, lextab='lextab', reflags=0):
method input (line 342) | def input(self, s, add_endmarker=True):
method token (line 347) | def token(self):
function Assign (line 364) | def Assign(left, right):
function p_file_input_end (line 386) | def p_file_input_end(p):
function p_file_input (line 391) | def p_file_input(p):
function p_funcdef (line 410) | def p_funcdef(p):
function p_parameters (line 417) | def p_parameters(p):
function p_varargslist (line 428) | def p_varargslist(p):
function p_stmt_simple (line 439) | def p_stmt_simple(p):
function p_stmt_compound (line 445) | def p_stmt_compound(p):
function p_simple_stmt (line 452) | def p_simple_stmt(p):
function p_small_stmts (line 458) | def p_small_stmts(p):
function p_small_stmt (line 470) | def p_small_stmt(p):
function p_expr_stmt (line 481) | def p_expr_stmt(p):
function p_flow_stmt (line 491) | def p_flow_stmt(p):
function p_return_stmt (line 498) | def p_return_stmt(p):
function p_compound_stmt (line 503) | def p_compound_stmt(p):
function p_if_stmt (line 509) | def p_if_stmt(p):
function p_suite (line 514) | def p_suite(p):
function p_stmts (line 523) | def p_stmts(p):
function make_lt_compare (line 540) | def make_lt_compare((left, right)):
function make_gt_compare (line 544) | def make_gt_compare((left, right)):
function make_eq_compare (line 548) | def make_eq_compare((left, right)):
function p_comparison (line 572) | def p_comparison(p):
function p_power (line 595) | def p_power(p):
function p_atom_name (line 607) | def p_atom_name(p):
function p_atom_number (line 612) | def p_atom_number(p):
function p_atom_tuple (line 618) | def p_atom_tuple(p):
function p_trailer (line 625) | def p_trailer(p):
function p_testlist (line 633) | def p_testlist(p):
function p_testlist_multi (line 649) | def p_testlist_multi(p):
function p_test (line 665) | def p_test(p):
function p_arglist (line 672) | def p_arglist(p):
function p_argument (line 683) | def p_argument(p):
function p_error (line 688) | def p_error(p):
class GardenSnakeParser (line 693) | class GardenSnakeParser(object):
method __init__ (line 695) | def __init__(self, lexer=None):
method parse (line 701) | def parse(self, code):
class GardenSnakeCompiler (line 712) | class GardenSnakeCompiler(object):
method __init__ (line 714) | def __init__(self):
method compile (line 717) | def compile(self, code, filename="<string>"):
function print_ (line 769) | def print_(*args):
FILE: xonsh/ply/example/ansic/clex.py
function t_NEWLINE (line 60) | def t_NEWLINE(t):
function t_ID (line 130) | def t_ID(t):
function t_comment (line 150) | def t_comment(t):
function t_preprocessor (line 157) | def t_preprocessor(t):
function t_error (line 162) | def t_error(t):
FILE: xonsh/ply/example/ansic/cparse.py
function p_translation_unit_1 (line 17) | def p_translation_unit_1(t):
function p_translation_unit_2 (line 22) | def p_translation_unit_2(t):
function p_external_declaration_1 (line 29) | def p_external_declaration_1(t):
function p_external_declaration_2 (line 34) | def p_external_declaration_2(t):
function p_function_definition_1 (line 41) | def p_function_definition_1(t):
function p_function_definition_2 (line 46) | def p_function_definition_2(t):
function p_function_definition_3 (line 51) | def p_function_definition_3(t):
function p_function_definition_4 (line 56) | def p_function_definition_4(t):
function p_declaration_1 (line 63) | def p_declaration_1(t):
function p_declaration_2 (line 68) | def p_declaration_2(t):
function p_declaration_list_1 (line 75) | def p_declaration_list_1(t):
function p_declaration_list_2 (line 80) | def p_declaration_list_2(t):
function p_declaration_specifiers_1 (line 87) | def p_declaration_specifiers_1(t):
function p_declaration_specifiers_2 (line 92) | def p_declaration_specifiers_2(t):
function p_declaration_specifiers_3 (line 97) | def p_declaration_specifiers_3(t):
function p_declaration_specifiers_4 (line 102) | def p_declaration_specifiers_4(t):
function p_declaration_specifiers_5 (line 107) | def p_declaration_specifiers_5(t):
function p_declaration_specifiers_6 (line 112) | def p_declaration_specifiers_6(t):
function p_storage_class_specifier (line 119) | def p_storage_class_specifier(t):
function p_type_specifier (line 131) | def p_type_specifier(t):
function p_type_qualifier (line 150) | def p_type_qualifier(t):
function p_struct_or_union_specifier_1 (line 158) | def p_struct_or_union_specifier_1(t):
function p_struct_or_union_specifier_2 (line 163) | def p_struct_or_union_specifier_2(t):
function p_struct_or_union_specifier_3 (line 168) | def p_struct_or_union_specifier_3(t):
function p_struct_or_union (line 175) | def p_struct_or_union(t):
function p_struct_declaration_list_1 (line 184) | def p_struct_declaration_list_1(t):
function p_struct_declaration_list_2 (line 189) | def p_struct_declaration_list_2(t):
function p_init_declarator_list_1 (line 196) | def p_init_declarator_list_1(t):
function p_init_declarator_list_2 (line 201) | def p_init_declarator_list_2(t):
function p_init_declarator_1 (line 208) | def p_init_declarator_1(t):
function p_init_declarator_2 (line 213) | def p_init_declarator_2(t):
function p_struct_declaration (line 220) | def p_struct_declaration(t):
function p_specifier_qualifier_list_1 (line 227) | def p_specifier_qualifier_list_1(t):
function p_specifier_qualifier_list_2 (line 232) | def p_specifier_qualifier_list_2(t):
function p_specifier_qualifier_list_3 (line 237) | def p_specifier_qualifier_list_3(t):
function p_specifier_qualifier_list_4 (line 242) | def p_specifier_qualifier_list_4(t):
function p_struct_declarator_list_1 (line 249) | def p_struct_declarator_list_1(t):
function p_struct_declarator_list_2 (line 254) | def p_struct_declarator_list_2(t):
function p_struct_declarator_1 (line 261) | def p_struct_declarator_1(t):
function p_struct_declarator_2 (line 266) | def p_struct_declarator_2(t):
function p_struct_declarator_3 (line 271) | def p_struct_declarator_3(t):
function p_enum_specifier_1 (line 278) | def p_enum_specifier_1(t):
function p_enum_specifier_2 (line 283) | def p_enum_specifier_2(t):
function p_enum_specifier_3 (line 288) | def p_enum_specifier_3(t):
function p_enumerator_list_1 (line 295) | def p_enumerator_list_1(t):
function p_enumerator_list_2 (line 300) | def p_enumerator_list_2(t):
function p_enumerator_1 (line 307) | def p_enumerator_1(t):
function p_enumerator_2 (line 312) | def p_enumerator_2(t):
function p_declarator_1 (line 319) | def p_declarator_1(t):
function p_declarator_2 (line 324) | def p_declarator_2(t):
function p_direct_declarator_1 (line 331) | def p_direct_declarator_1(t):
function p_direct_declarator_2 (line 336) | def p_direct_declarator_2(t):
function p_direct_declarator_3 (line 341) | def p_direct_declarator_3(t):
function p_direct_declarator_4 (line 346) | def p_direct_declarator_4(t):
function p_direct_declarator_5 (line 351) | def p_direct_declarator_5(t):
function p_direct_declarator_6 (line 356) | def p_direct_declarator_6(t):
function p_pointer_1 (line 363) | def p_pointer_1(t):
function p_pointer_2 (line 368) | def p_pointer_2(t):
function p_pointer_3 (line 373) | def p_pointer_3(t):
function p_pointer_4 (line 378) | def p_pointer_4(t):
function p_type_qualifier_list_1 (line 385) | def p_type_qualifier_list_1(t):
function p_type_qualifier_list_2 (line 390) | def p_type_qualifier_list_2(t):
function p_parameter_type_list_1 (line 397) | def p_parameter_type_list_1(t):
function p_parameter_type_list_2 (line 402) | def p_parameter_type_list_2(t):
function p_parameter_list_1 (line 409) | def p_parameter_list_1(t):
function p_parameter_list_2 (line 414) | def p_parameter_list_2(t):
function p_parameter_declaration_1 (line 421) | def p_parameter_declaration_1(t):
function p_parameter_declaration_2 (line 426) | def p_parameter_declaration_2(t):
function p_identifier_list_1 (line 433) | def p_identifier_list_1(t):
function p_identifier_list_2 (line 438) | def p_identifier_list_2(t):
function p_initializer_1 (line 445) | def p_initializer_1(t):
function p_initializer_2 (line 450) | def p_initializer_2(t):
function p_initializer_list_1 (line 458) | def p_initializer_list_1(t):
function p_initializer_list_2 (line 463) | def p_initializer_list_2(t):
function p_type_name (line 470) | def p_type_name(t):
function p_abstract_declarator_opt_1 (line 475) | def p_abstract_declarator_opt_1(t):
function p_abstract_declarator_opt_2 (line 480) | def p_abstract_declarator_opt_2(t):
function p_abstract_declarator_1 (line 487) | def p_abstract_declarator_1(t):
function p_abstract_declarator_2 (line 492) | def p_abstract_declarator_2(t):
function p_abstract_declarator_3 (line 497) | def p_abstract_declarator_3(t):
function p_direct_abstract_declarator_1 (line 504) | def p_direct_abstract_declarator_1(t):
function p_direct_abstract_declarator_2 (line 509) | def p_direct_abstract_declarator_2(t):
function p_direct_abstract_declarator_3 (line 514) | def p_direct_abstract_declarator_3(t):
function p_direct_abstract_declarator_4 (line 519) | def p_direct_abstract_declarator_4(t):
function p_direct_abstract_declarator_5 (line 524) | def p_direct_abstract_declarator_5(t):
function p_constant_expression_opt_1 (line 531) | def p_constant_expression_opt_1(t):
function p_constant_expression_opt_2 (line 536) | def p_constant_expression_opt_2(t):
function p_parameter_type_list_opt_1 (line 541) | def p_parameter_type_list_opt_1(t):
function p_parameter_type_list_opt_2 (line 546) | def p_parameter_type_list_opt_2(t):
function p_statement (line 553) | def p_statement(t):
function p_labeled_statement_1 (line 567) | def p_labeled_statement_1(t):
function p_labeled_statement_2 (line 572) | def p_labeled_statement_2(t):
function p_labeled_statement_3 (line 577) | def p_labeled_statement_3(t):
function p_expression_statement (line 584) | def p_expression_statement(t):
function p_compound_statement_1 (line 591) | def p_compound_statement_1(t):
function p_compound_statement_2 (line 596) | def p_compound_statement_2(t):
function p_compound_statement_3 (line 601) | def p_compound_statement_3(t):
function p_compound_statement_4 (line 606) | def p_compound_statement_4(t):
function p_statement_list_1 (line 613) | def p_statement_list_1(t):
function p_statement_list_2 (line 618) | def p_statement_list_2(t):
function p_selection_statement_1 (line 625) | def p_selection_statement_1(t):
function p_selection_statement_2 (line 630) | def p_selection_statement_2(t):
function p_selection_statement_3 (line 635) | def p_selection_statement_3(t):
function p_iteration_statement_1 (line 642) | def p_iteration_statement_1(t):
function p_iteration_statement_2 (line 647) | def p_iteration_statement_2(t):
function p_iteration_statement_3 (line 652) | def p_iteration_statement_3(t):
function p_jump_statement_1 (line 659) | def p_jump_statement_1(t):
function p_jump_statement_2 (line 664) | def p_jump_statement_2(t):
function p_jump_statement_3 (line 669) | def p_jump_statement_3(t):
function p_jump_statement_4 (line 674) | def p_jump_statement_4(t):
function p_expression_opt_1 (line 679) | def p_expression_opt_1(t):
function p_expression_opt_2 (line 684) | def p_expression_opt_2(t):
function p_expression_1 (line 691) | def p_expression_1(t):
function p_expression_2 (line 696) | def p_expression_2(t):
function p_assignment_expression_1 (line 703) | def p_assignment_expression_1(t):
function p_assignment_expression_2 (line 708) | def p_assignment_expression_2(t):
function p_assignment_operator (line 715) | def p_assignment_operator(t):
function p_conditional_expression_1 (line 734) | def p_conditional_expression_1(t):
function p_conditional_expression_2 (line 739) | def p_conditional_expression_2(t):
function p_constant_expression (line 746) | def p_constant_expression(t):
function p_logical_or_expression_1 (line 753) | def p_logical_or_expression_1(t):
function p_logical_or_expression_2 (line 758) | def p_logical_or_expression_2(t):
function p_logical_and_expression_1 (line 765) | def p_logical_and_expression_1(t):
function p_logical_and_expression_2 (line 770) | def p_logical_and_expression_2(t):
function p_inclusive_or_expression_1 (line 777) | def p_inclusive_or_expression_1(t):
function p_inclusive_or_expression_2 (line 782) | def p_inclusive_or_expression_2(t):
function p_exclusive_or_expression_1 (line 789) | def p_exclusive_or_expression_1(t):
function p_exclusive_or_expression_2 (line 794) | def p_exclusive_or_expression_2(t):
function p_and_expression_1 (line 801) | def p_and_expression_1(t):
function p_and_expression_2 (line 806) | def p_and_expression_2(t):
function p_equality_expression_1 (line 812) | def p_equality_expression_1(t):
function p_equality_expression_2 (line 817) | def p_equality_expression_2(t):
function p_equality_expression_3 (line 822) | def p_equality_expression_3(t):
function p_relational_expression_1 (line 828) | def p_relational_expression_1(t):
function p_relational_expression_2 (line 833) | def p_relational_expression_2(t):
function p_relational_expression_3 (line 838) | def p_relational_expression_3(t):
function p_relational_expression_4 (line 843) | def p_relational_expression_4(t):
function p_relational_expression_5 (line 848) | def p_relational_expression_5(t):
function p_shift_expression_1 (line 855) | def p_shift_expression_1(t):
function p_shift_expression_2 (line 860) | def p_shift_expression_2(t):
function p_shift_expression_3 (line 865) | def p_shift_expression_3(t):
function p_additive_expression_1 (line 872) | def p_additive_expression_1(t):
function p_additive_expression_2 (line 877) | def p_additive_expression_2(t):
function p_additive_expression_3 (line 882) | def p_additive_expression_3(t):
function p_multiplicative_expression_1 (line 889) | def p_multiplicative_expression_1(t):
function p_multiplicative_expression_2 (line 894) | def p_multiplicative_expression_2(t):
function p_multiplicative_expression_3 (line 899) | def p_multiplicative_expression_3(t):
function p_multiplicative_expression_4 (line 904) | def p_multiplicative_expression_4(t):
function p_cast_expression_1 (line 911) | def p_cast_expression_1(t):
function p_cast_expression_2 (line 916) | def p_cast_expression_2(t):
function p_unary_expression_1 (line 923) | def p_unary_expression_1(t):
function p_unary_expression_2 (line 928) | def p_unary_expression_2(t):
function p_unary_expression_3 (line 933) | def p_unary_expression_3(t):
function p_unary_expression_4 (line 938) | def p_unary_expression_4(t):
function p_unary_expression_5 (line 943) | def p_unary_expression_5(t):
function p_unary_expression_6 (line 948) | def p_unary_expression_6(t):
function p_unary_operator (line 955) | def p_unary_operator(t):
function p_postfix_expression_1 (line 967) | def p_postfix_expression_1(t):
function p_postfix_expression_2 (line 972) | def p_postfix_expression_2(t):
function p_postfix_expression_3 (line 977) | def p_postfix_expression_3(t):
function p_postfix_expression_4 (line 982) | def p_postfix_expression_4(t):
function p_postfix_expression_5 (line 987) | def p_postfix_expression_5(t):
function p_postfix_expression_6 (line 992) | def p_postfix_expression_6(t):
function p_postfix_expression_7 (line 997) | def p_postfix_expression_7(t):
function p_postfix_expression_8 (line 1002) | def p_postfix_expression_8(t):
function p_primary_expression (line 1009) | def p_primary_expression(t):
function p_argument_expression_list (line 1019) | def p_argument_expression_list(t):
function p_constant (line 1027) | def p_constant(t):
function p_empty (line 1034) | def p_empty(t):
function p_error (line 1039) | def p_error(t):
FILE: xonsh/ply/example/calc/calc.py
function t_NUMBER (line 25) | def t_NUMBER(t):
function t_newline (line 33) | def t_newline(t):
function t_error (line 38) | def t_error(t):
function p_statement_assign (line 58) | def p_statement_assign(p):
function p_statement_expr (line 63) | def p_statement_expr(p):
function p_expression_binop (line 68) | def p_expression_binop(p):
function p_expression_uminus (line 83) | def p_expression_uminus(p):
function p_expression_group (line 88) | def p_expression_group(p):
function p_expression_number (line 93) | def p_expression_number(p):
function p_expression_name (line 98) | def p_expression_name(p):
function p_error (line 107) | def p_error(p):
FILE: xonsh/ply/example/calcdebug/calc.py
function t_NUMBER (line 25) | def t_NUMBER(t):
function t_newline (line 33) | def t_newline(t):
function t_error (line 38) | def t_error(t):
function p_statement_assign (line 58) | def p_statement_assign(p):
function p_statement_expr (line 63) | def p_statement_expr(p):
function p_expression_binop (line 68) | def p_expression_binop(p):
function p_expression_uminus (line 83) | def p_expression_uminus(p):
function p_expression_group (line 88) | def p_expression_group(p):
function p_expression_number (line 93) | def p_expression_number(p):
function p_expression_name (line 98) | def p_expression_name(p):
function p_error (line 107) | def p_error(p):
FILE: xonsh/ply/example/calceof/calc.py
function t_NUMBER (line 25) | def t_NUMBER(t):
function t_newline (line 33) | def t_newline(t):
function t_eof (line 38) | def t_eof(t):
function t_error (line 47) | def t_error(t):
function p_statement_assign (line 67) | def p_statement_assign(p):
function p_statement_expr (line 72) | def p_statement_expr(p):
function p_expression_binop (line 77) | def p_expression_binop(p):
function p_expression_uminus (line 92) | def p_expression_uminus(p):
function p_expression_group (line 97) | def p_expression_group(p):
function p_expression_number (line 102) | def p_expression_number(p):
function p_expression_name (line 107) | def p_expression_name(p):
function p_error (line 116) | def p_error(p):
FILE: xonsh/ply/example/classcalc/calc.py
class Parser (line 23) | class Parser:
method __init__ (line 30) | def __init__(self, **kw):
method run (line 49) | def run(self):
class Calc (line 60) | class Calc(Parser):
method t_NUMBER (line 80) | def t_NUMBER(self, t):
method t_newline (line 92) | def t_newline(self, t):
method t_error (line 96) | def t_error(self, t):
method p_statement_assign (line 109) | def p_statement_assign(self, p):
method p_statement_expr (line 113) | def p_statement_expr(self, p):
method p_expression_binop (line 117) | def p_expression_binop(self, p):
method p_expression_uminus (line 137) | def p_expression_uminus(self, p):
method p_expression_group (line 141) | def p_expression_group(self, p):
method p_expression_number (line 145) | def p_expression_number(self, p):
method p_expression_name (line 149) | def p_expression_name(self, p):
method p_error (line 157) | def p_error(self, p):
FILE: xonsh/ply/example/closurecalc/calc.py
function make_calculator (line 18) | def make_calculator():
FILE: xonsh/ply/example/hedit/hedit.py
function t_H_EDIT_DESCRIPTOR (line 29) | def t_H_EDIT_DESCRIPTOR(t):
function t_error (line 41) | def t_error(t):
FILE: xonsh/ply/example/newclasscalc/calc.py
class Parser (line 25) | class Parser(object):
method __init__ (line 32) | def __init__(self, **kw):
method run (line 51) | def run(self):
class Calc (line 62) | class Calc(Parser):
method t_NUMBER (line 82) | def t_NUMBER(self, t):
method t_newline (line 94) | def t_newline(self, t):
method t_error (line 98) | def t_error(self, t):
method p_statement_assign (line 111) | def p_statement_assign(self, p):
method p_statement_expr (line 115) | def p_statement_expr(self, p):
method p_expression_binop (line 119) | def p_expression_binop(self, p):
method p_expression_uminus (line 139) | def p_expression_uminus(self, p):
method p_expression_group (line 143) | def p_expression_group(self, p):
method p_expression_number (line 147) | def p_expression_number(self, p):
method p_expression_name (line 151) | def p_expression_name(self, p):
method p_error (line 159) | def p_error(self, p):
FILE: xonsh/ply/example/optcalc/calc.py
function t_NUMBER (line 32) | def t_NUMBER(t):
function t_newline (line 44) | def t_newline(t):
function t_error (line 49) | def t_error(t):
function p_statement_assign (line 69) | def p_statement_assign(t):
function p_statement_expr (line 74) | def p_statement_expr(t):
function p_expression_binop (line 79) | def p_expression_binop(t):
function p_expression_uminus (line 96) | def p_expression_uminus(t):
function p_expression_group (line 101) | def p_expression_group(t):
function p_expression_number (line 106) | def p_expression_number(t):
function p_expression_name (line 111) | def p_expression_name(t):
function p_error (line 120) | def p_error(t):
FILE: xonsh/ply/example/unicalc/calc.py
function t_NUMBER (line 31) | def t_NUMBER(t):
function t_newline (line 43) | def t_newline(t):
function t_error (line 48) | def t_error(t):
function p_statement_assign (line 68) | def p_statement_assign(p):
function p_statement_expr (line 73) | def p_statement_expr(p):
function p_expression_binop (line 78) | def p_expression_binop(p):
function p_expression_uminus (line 93) | def p_expression_uminus(p):
function p_expression_group (line 98) | def p_expression_group(p):
function p_expression_number (line 103) | def p_expression_number(p):
function p_expression_name (line 108) | def p_expression_name(p):
function p_error (line 117) | def p_error(p):
FILE: xonsh/ply/example/yply/ylex.py
function t_SECTION (line 34) | def t_SECTION(t):
function t_ccomment (line 46) | def t_ccomment(t):
function t_LITERAL (line 53) | def t_LITERAL(t):
function t_NEWLINE (line 59) | def t_NEWLINE(t):
function t_code (line 64) | def t_code(t):
function t_code_ignore_string (line 71) | def t_code_ignore_string(t):
function t_code_ignore_char (line 75) | def t_code_ignore_char(t):
function t_code_ignore_comment (line 79) | def t_code_ignore_comment(t):
function t_code_ignore_cppcom (line 83) | def t_code_ignore_cppcom(t):
function t_code_lbrace (line 87) | def t_code_lbrace(t):
function t_code_rbrace (line 92) | def t_code_rbrace(t):
function t_code_error (line 107) | def t_code_error(t):
function t_error (line 111) | def t_error(t):
FILE: xonsh/ply/example/yply/yparse.py
function p_yacc (line 17) | def p_yacc(p):
function p_defsection (line 21) | def p_defsection(p):
function p_rulesection (line 33) | def p_rulesection(p):
function p_definitions (line 40) | def p_definitions(p):
function p_definition_literal (line 45) | def p_definition_literal(p):
function p_definition_start (line 50) | def p_definition_start(p):
function p_definition_token (line 55) | def p_definition_token(p):
function p_toktype (line 68) | def p_toktype(p):
function p_opttype (line 76) | def p_opttype(p):
function p_idlist (line 81) | def p_idlist(p):
function p_tokenid (line 91) | def p_tokenid(p):
function p_optsemi (line 99) | def p_optsemi(p):
function p_optcomma (line 104) | def p_optcomma(p):
function p_definition_type (line 109) | def p_definition_type(p):
function p_namelist (line 114) | def p_namelist(p):
function p_definition_union (line 119) | def p_definition_union(p):
function p_rules (line 124) | def p_rules(p):
function p_rule (line 171) | def p_rule(p):
function p_rule2 (line 176) | def p_rule2(p):
function p_rule_empty (line 182) | def p_rule_empty(p):
function p_rule_empty2 (line 187) | def p_rule_empty2(p):
function p_morerules (line 194) | def p_morerules(p):
function p_rulelist (line 210) | def p_rulelist(p):
function p_ruleitem (line 221) | def p_ruleitem(p):
function p_empty (line 229) | def p_empty(p):
function p_error (line 233) | def p_error(p):
function print_code (line 239) | def print_code(code, indent):
FILE: xonsh/ply/ply/cpp.py
function t_CPP_WS (line 61) | def t_CPP_WS(t):
function CPP_INTEGER (line 73) | def CPP_INTEGER(t):
function t_CPP_STRING (line 83) | def t_CPP_STRING(t):
function t_CPP_CHAR (line 89) | def t_CPP_CHAR(t):
function t_CPP_COMMENT1 (line 95) | def t_CPP_COMMENT1(t):
function t_CPP_COMMENT2 (line 104) | def t_CPP_COMMENT2(t):
function t_error (line 110) | def t_error(t):
function trigraph (line 151) | def trigraph(input):
class Macro (line 170) | class Macro(object):
method __init__ (line 171) | def __init__(self,name,value,arglist=None,variadic=False):
class Preprocessor (line 187) | class Preprocessor(object):
method __init__ (line 188) | def __init__(self,lexer=None):
method tokenize (line 210) | def tokenize(self,text):
method error (line 225) | def error(self,file,line,msg):
method lexprobe (line 237) | def lexprobe(self):
method add_path (line 297) | def add_path(self,path):
method group_lines (line 309) | def group_lines(self,input):
method tokenstrip (line 342) | def tokenstrip(self,tokens):
method collect_args (line 370) | def collect_args(self,tokenlist):
method macro_prescan (line 423) | def macro_prescan(self,macro):
method macro_expand_args (line 467) | def macro_expand_args(self,macro,args,expanded):
method expand_macros (line 517) | def expand_macros(self,tokens,expanded=None):
method evalexpr (line 589) | def evalexpr(self,tokens):
method evalexpr_expanded (line 629) | def evalexpr_expanded(self, tokens):
method evalexpr_string (line 650) | def evalexpr_string(self, expr):
method parsegen (line 667) | def parsegen(self,input,source=None):
method include (line 798) | def include(self,tokens):
method read_include_file (line 850) | def read_include_file(self, filepath):
method define (line 860) | def define(self,tokens):
method undef (line 930) | def undef(self,tokens):
method parse (line 942) | def parse(self,input,source=None,ignore={}):
method token (line 951) | def token(self):
FILE: xonsh/ply/ply/ctokens.py
function t_COMMENT (line 118) | def t_COMMENT(t):
function t_CPPCOMMENT (line 124) | def t_CPPCOMMENT(t):
FILE: xonsh/ply/ply/lex.py
class LexError (line 59) | class LexError(Exception):
method __init__ (line 60) | def __init__(self, message, s):
class LexToken (line 66) | class LexToken(object):
method __str__ (line 67) | def __str__(self):
method __repr__ (line 70) | def __repr__(self):
class PlyLogger (line 77) | class PlyLogger(object):
method __init__ (line 78) | def __init__(self, f):
method critical (line 81) | def critical(self, msg, *args, **kwargs):
method warning (line 84) | def warning(self, msg, *args, **kwargs):
method error (line 87) | def error(self, msg, *args, **kwargs):
class NullLogger (line 95) | class NullLogger(object):
method __getattribute__ (line 96) | def __getattribute__(self, name):
method __call__ (line 99) | def __call__(self, *args, **kwargs):
class Lexer (line 117) | class Lexer:
method __init__ (line 118) | def __init__(self):
method clone (line 146) | def clone(self, object=None):
method writetab (line 176) | def writetab(self, lextab, outputdir=''):
method readtab (line 213) | def readtab(self, tabfile, fdict):
method input (line 253) | def input(self, s):
method begin (line 265) | def begin(self, state):
method push_state (line 278) | def push_state(self, state):
method pop_state (line 285) | def pop_state(self):
method current_state (line 291) | def current_state(self):
method skip (line 297) | def skip(self, n):
method token (line 307) | def token(self):
method __iter__ (line 417) | def __iter__(self):
method next (line 420) | def next(self):
function _get_regex (line 441) | def _get_regex(func):
function get_caller_module_dict (line 451) | def get_caller_module_dict(levels):
function _funcs_to_names (line 464) | def _funcs_to_names(funclist, namelist):
function _names_to_funcs (line 479) | def _names_to_funcs(namelist, fdict):
function _form_master_re (line 495) | def _form_master_re(relist, reflags, ldict, toknames):
function _statetoken (line 535) | def _statetoken(s, names):
class LexerReflect (line 559) | class LexerReflect(object):
method __init__ (line 560) | def __init__(self, ldict, log=None, reflags=0):
method get_all (line 571) | def get_all(self):
method validate_all (line 578) | def validate_all(self):
method get_tokens (line 585) | def get_tokens(self):
method validate_tokens (line 605) | def validate_tokens(self):
method get_literals (line 616) | def get_literals(self):
method validate_literals (line 622) | def validate_literals(self):
method get_states (line 633) | def get_states(self):
method get_rules (line 664) | def get_rules(self):
method validate_rules (line 730) | def validate_rules(self):
method validate_module (line 833) | def validate_module(self, module):
function lex (line 864) | def lex(module=None, object=None, debug=False, optimize=False, lextab='l...
function runmain (line 1056) | def runmain(lexer=None, data=None):
function TOKEN (line 1089) | def TOKEN(r):
FILE: xonsh/ply/ply/yacc.py
class PlyLogger (line 110) | class PlyLogger(object):
method __init__ (line 111) | def __init__(self, f):
method debug (line 114) | def debug(self, msg, *args, **kwargs):
method warning (line 119) | def warning(self, msg, *args, **kwargs):
method error (line 122) | def error(self, msg, *args, **kwargs):
class NullLogger (line 128) | class NullLogger(object):
method __getattribute__ (line 129) | def __getattribute__(self, name):
method __call__ (line 132) | def __call__(self, *args, **kwargs):
class YaccError (line 136) | class YaccError(Exception):
function format_result (line 140) | def format_result(r):
function format_stack_entry (line 150) | def format_stack_entry(r):
function errok (line 176) | def errok():
function restart (line 180) | def restart():
function token (line 184) | def token():
function call_errorfunc (line 189) | def call_errorfunc(errorfunc, token, parser):
class YaccSymbol (line 218) | class YaccSymbol:
method __str__ (line 219) | def __str__(self):
method __repr__ (line 222) | def __repr__(self):
class YaccProduction (line 234) | class YaccProduction:
method __init__ (line 235) | def __init__(self, s, stack=None):
method __getitem__ (line 241) | def __getitem__(self, n):
method __setitem__ (line 249) | def __setitem__(self, n, v):
method __getslice__ (line 252) | def __getslice__(self, i, j):
method __len__ (line 255) | def __len__(self):
method lineno (line 258) | def lineno(self, n):
method set_lineno (line 261) | def set_lineno(self, n, lineno):
method linespan (line 264) | def linespan(self, n):
method lexpos (line 269) | def lexpos(self, n):
method set_lexpos (line 272) | def set_lexpos(self, n, lexpos):
method lexspan (line 275) | def lexspan(self, n):
method error (line 280) | def error(self):
class LRParser (line 289) | class LRParser:
method __init__ (line 290) | def __init__(self, lrtab, errorf):
method errok (line 298) | def errok(self):
method restart (line 301) | def restart(self):
method set_defaulted_states (line 317) | def set_defaulted_states(self):
method disable_defaulted_states (line 324) | def disable_defaulted_states(self):
method parse (line 327) | def parse(self, input=None, lexer=None, debug=False, tracking=False, t...
method parsedebug (line 352) | def parsedebug(self, input=None, lexer=None, debug=False, tracking=Fal...
method parseopt (line 699) | def parseopt(self, input=None, lexer=None, debug=False, tracking=False...
method parseopt_notrack (line 1005) | def parseopt_notrack(self, input=None, lexer=None, debug=False, tracki...
class Production (line 1313) | class Production(object):
method __init__ (line 1315) | def __init__(self, number, name, prod, precedence=('right', 0), func=N...
method __str__ (line 1345) | def __str__(self):
method __repr__ (line 1348) | def __repr__(self):
method __len__ (line 1351) | def __len__(self):
method __nonzero__ (line 1354) | def __nonzero__(self):
method __getitem__ (line 1357) | def __getitem__(self, index):
method lr_item (line 1361) | def lr_item(self, n):
method bind (line 1377) | def bind(self, pdict):
class MiniProduction (line 1385) | class MiniProduction(object):
method __init__ (line 1386) | def __init__(self, str, name, len, func, file, line):
method __str__ (line 1395) | def __str__(self):
method __repr__ (line 1398) | def __repr__(self):
method bind (line 1402) | def bind(self, pdict):
class LRItem (line 1431) | class LRItem(object):
method __init__ (line 1432) | def __init__(self, p, n):
method __str__ (line 1443) | def __str__(self):
method __repr__ (line 1450) | def __repr__(self):
function rightmost_terminal (line 1458) | def rightmost_terminal(symbols, terminals):
class GrammarError (line 1474) | class GrammarError(YaccError):
class Grammar (line 1477) | class Grammar(object):
method __init__ (line 1478) | def __init__(self, terminals):
method __len__ (line 1514) | def __len__(self):
method __getitem__ (line 1517) | def __getitem__(self, index):
method set_precedence (line 1528) | def set_precedence(self, term, assoc, level):
method add_production (line 1553) | def add_production(self, prodname, syms, func=None, file='', line=0):
method set_start (line 1637) | def set_start(self, start=None):
method find_unreachable (line 1653) | def find_unreachable(self):
method infinite_cycles (line 1676) | def infinite_cycles(self):
method undefined_symbols (line 1740) | def undefined_symbols(self):
method unused_terminals (line 1757) | def unused_terminals(self):
method unused_rules (line 1772) | def unused_rules(self):
method unused_precedence (line 1789) | def unused_precedence(self):
method _first (line 1805) | def _first(self, beta):
method compute_first (line 1840) | def compute_first(self):
method compute_follow (line 1877) | def compute_follow(self, start=None):
method build_lritems (line 1936) | def build_lritems(self):
class VersionError (line 1972) | class VersionError(YaccError):
class LRTable (line 1975) | class LRTable(object):
method __init__ (line 1976) | def __init__(self):
method read_table (line 1982) | def read_table(self, module):
method read_pickle (line 2002) | def read_pickle(self, filename):
method bind_callables (line 2030) | def bind_callables(self, pdict):
function digraph (line 2059) | def digraph(X, R, FP):
function traverse (line 2070) | def traverse(x, N, stack, F, X, R, FP):
class LALRError (line 2093) | class LALRError(YaccError):
class LRGeneratedTable (line 2103) | class LRGeneratedTable(LRTable):
method __init__ (line 2104) | def __init__(self, grammar, method='LALR', log=None):
method lr0_closure (line 2141) | def lr0_closure(self, I):
method lr0_goto (line 2167) | def lr0_goto(self, I, x):
method lr0_items (line 2202) | def lr0_items(self):
method compute_nullable_nonterminals (line 2258) | def compute_nullable_nonterminals(self):
method find_nonterminal_transitions (line 2287) | def find_nonterminal_transitions(self, C):
method dr_relation (line 2307) | def dr_relation(self, C, trans, nullable):
method reads_relation (line 2331) | def reads_relation(self, C, trans, empty):
method compute_lookback_includes (line 2374) | def compute_lookback_includes(self, C, trans, nullable):
method compute_read_sets (line 2454) | def compute_read_sets(self, C, ntrans, nullable):
method compute_follow_sets (line 2476) | def compute_follow_sets(self, ntrans, readsets, inclsets):
method add_lookaheads (line 2494) | def add_lookaheads(self, lookbacks, followset):
method add_lalr_lookaheads (line 2512) | def add_lalr_lookaheads(self, C):
method lr_parse_table (line 2536) | def lr_parse_table(self):
method write_table (line 2729) | def write_table(self, tabmodule, outputdir='', signature=''):
method pickle_table (line 2852) | def pickle_table(self, filename, signature=''):
function get_caller_module_dict (line 2887) | def get_caller_module_dict(levels):
function parse_grammar (line 2899) | def parse_grammar(doc, file, line):
class ParserReflect (line 2940) | class ParserReflect(object):
method __init__ (line 2941) | def __init__(self, pdict, log=None):
method get_all (line 2956) | def get_all(self):
method validate_all (line 2964) | def validate_all(self):
method signature (line 2974) | def signature(self):
method validate_modules (line 3001) | def validate_modules(self):
method get_start (line 3026) | def get_start(self):
method validate_start (line 3030) | def validate_start(self):
method get_error_func (line 3036) | def get_error_func(self):
method validate_error_func (line 3040) | def validate_error_func(self):
method get_tokens (line 3062) | def get_tokens(self):
method validate_tokens (line 3082) | def validate_tokens(self):
method get_precedence (line 3096) | def get_precedence(self):
method validate_precedence (line 3100) | def validate_precedence(self):
method get_pfunctions (line 3131) | def get_pfunctions(self):
method validate_pfunctions (line 3152) | def validate_pfunctions(self):
function yacc (line 3218) | def yacc(method='LALR', debug=yaccdebug, module=None, tabmodule=tab_modu...
FILE: xonsh/ply/ply/ygen.py
function get_source_range (line 13) | def get_source_range(lines, tag):
function filter_section (line 28) | def filter_section(lines, tag):
function main (line 39) | def main():
FILE: xonsh/ply/test/calclex.py
function t_NUMBER (line 26) | def t_NUMBER(t):
function t_newline (line 37) | def t_newline(t):
function t_error (line 41) | def t_error(t):
FILE: xonsh/ply/test/lex_closure.py
function make_calc (line 15) | def make_calc():
FILE: xonsh/ply/test/lex_doc1.py
function t_NUMBER (line 18) | def t_NUMBER(t):
function t_error (line 21) | def t_error(t):
FILE: xonsh/ply/test/lex_dup1.py
function t_error (line 22) | def t_error(t):
FILE: xonsh/ply/test/lex_dup2.py
function t_NUMBER (line 18) | def t_NUMBER(t):
function t_NUMBER (line 22) | def t_NUMBER(t):
function t_error (line 26) | def t_error(t):
FILE: xonsh/ply/test/lex_dup3.py
function t_NUMBER (line 20) | def t_NUMBER(t):
function t_error (line 24) | def t_error(t):
FILE: xonsh/ply/test/lex_error3.py
function t_error (line 20) | def t_error():
FILE: xonsh/ply/test/lex_error4.py
function t_error (line 20) | def t_error(t,s):
FILE: xonsh/ply/test/lex_hedit.py
function t_H_EDIT_DESCRIPTOR (line 28) | def t_H_EDIT_DESCRIPTOR(t):
function t_error (line 38) | def t_error(t):
FILE: xonsh/ply/test/lex_ignore.py
function t_ignore (line 20) | def t_ignore(t):
function t_error (line 24) | def t_error(t):
FILE: xonsh/ply/test/lex_ignore2.py
function t_error (line 22) | def t_error(t):
FILE: xonsh/ply/test/lex_literal1.py
function t_NUMBER (line 16) | def t_NUMBER(t):
function t_error (line 20) | def t_error(t):
FILE: xonsh/ply/test/lex_literal2.py
function t_NUMBER (line 16) | def t_NUMBER(t):
function t_error (line 20) | def t_error(t):
FILE: xonsh/ply/test/lex_literal3.py
function t_NUMBER (line 17) | def t_NUMBER(t):
function t_error (line 21) | def t_error(t):
FILE: xonsh/ply/test/lex_many_tokens.py
function t_error (line 21) | def t_error(t):
FILE: xonsh/ply/test/lex_module_import.py
function t_NUMBER (line 24) | def t_NUMBER(t):
function t_newline (line 35) | def t_newline(t):
function t_error (line 39) | def t_error(t):
FILE: xonsh/ply/test/lex_object.py
class CalcLexer (line 9) | class CalcLexer:
method t_NUMBER (line 27) | def t_NUMBER(self,t):
method t_newline (line 38) | def t_newline(self,t):
method t_error (line 42) | def t_error(self,t):
FILE: xonsh/ply/test/lex_opt_alias.py
function t_instdef_spam_BITS (line 21) | def t_instdef_spam_BITS(t):
function NUMBER (line 27) | def NUMBER(t):
function t_newline (line 41) | def t_newline(t):
function t_error (line 45) | def t_error(t):
FILE: xonsh/ply/test/lex_optimize.py
function t_NUMBER (line 26) | def t_NUMBER(t):
function t_newline (line 37) | def t_newline(t):
function t_error (line 41) | def t_error(t):
FILE: xonsh/ply/test/lex_optimize2.py
function t_NUMBER (line 26) | def t_NUMBER(t):
function t_newline (line 37) | def t_newline(t):
function t_error (line 41) | def t_error(t):
FILE: xonsh/ply/test/lex_optimize3.py
function t_NUMBER (line 28) | def t_NUMBER(t):
function t_newline (line 39) | def t_newline(t):
function t_error (line 43) | def t_error(t):
FILE: xonsh/ply/test/lex_optimize4.py
function t_error (line 20) | def t_error(t):
FILE: xonsh/ply/test/lex_re1.py
function t_error (line 20) | def t_error(t):
FILE: xonsh/ply/test/lex_re2.py
function t_error (line 20) | def t_error(t):
FILE: xonsh/ply/test/lex_re3.py
function t_error (line 22) | def t_error(t):
FILE: xonsh/ply/test/lex_rule1.py
function t_error (line 20) | def t_error(t):
FILE: xonsh/ply/test/lex_rule2.py
function t_NUMBER (line 18) | def t_NUMBER():
function t_error (line 22) | def t_error(t):
FILE: xonsh/ply/test/lex_rule3.py
function t_NUMBER (line 18) | def t_NUMBER(t,s):
function t_error (line 22) | def t_error(t):
FILE: xonsh/ply/test/lex_state1.py
function t_comment (line 23) | def t_comment(t):
function t_comment_body_part (line 28) | def t_comment_body_part(t):
function t_error (line 33) | def t_error(t):
FILE: xonsh/ply/test/lex_state2.py
function t_comment (line 23) | def t_comment(t):
function t_comment_body_part (line 28) | def t_comment_body_part(t):
function t_error (line 33) | def t_error(t):
FILE: xonsh/ply/test/lex_state3.py
function t_comment (line 25) | def t_comment(t):
function t_comment_body_part (line 30) | def t_comment_body_part(t):
function t_error (line 35) | def t_error(t):
FILE: xonsh/ply/test/lex_state4.py
function t_comment (line 24) | def t_comment(t):
function t_comment_body_part (line 29) | def t_comment_body_part(t):
function t_error (line 34) | def t_error(t):
FILE: xonsh/ply/test/lex_state5.py
function t_comment (line 24) | def t_comment(t):
function t_comment_body_part (line 29) | def t_comment_body_part(t):
function t_error (line 34) | def t_error(t):
FILE: xonsh/ply/test/lex_state_noerror.py
function t_comment (line 23) | def t_comment(t):
function t_comment_body_part (line 28) | def t_comment_body_part(t):
function t_error (line 33) | def t_error(t):
FILE: xonsh/ply/test/lex_state_norule.py
function t_comment (line 24) | def t_comment(t):
function t_comment_body_part (line 29) | def t_comment_body_part(t):
function t_error (line 34) | def t_error(t):
FILE: xonsh/ply/test/lex_state_try.py
function t_comment (line 25) | def t_comment(t):
function t_comment_body_part (line 30) | def t_comment_body_part(t):
function t_error (line 35) | def t_error(t):
FILE: xonsh/ply/test/lex_token1.py
function t_error (line 14) | def t_error(t):
FILE: xonsh/ply/test/lex_token2.py
function t_error (line 16) | def t_error(t):
FILE: xonsh/ply/test/lex_token3.py
function t_error (line 19) | def t_error(t):
FILE: xonsh/ply/test/lex_token4.py
function t_error (line 21) | def t_error(t):
FILE: xonsh/ply/test/lex_token5.py
function t_NUMBER (line 19) | def t_NUMBER(t):
function t_error (line 24) | def t_error(t):
FILE: xonsh/ply/test/lex_token_dup.py
function t_NUMBER (line 20) | def t_NUMBER(t):
function t_error (line 24) | def t_error(t):
FILE: xonsh/ply/test/pkg_test1/parsing/calclex.py
function t_NUMBER (line 24) | def t_NUMBER(t):
function t_newline (line 35) | def t_newline(t):
function t_error (line 39) | def t_error(t):
FILE: xonsh/ply/test/pkg_test1/parsing/calcparse.py
function p_statement_assign (line 20) | def p_statement_assign(t):
function p_statement_expr (line 24) | def p_statement_expr(t):
function p_expression_binop (line 28) | def p_expression_binop(t):
function p_expression_uminus (line 38) | def p_expression_uminus(t):
function p_expression_group (line 42) | def p_expression_group(t):
function p_expression_number (line 46) | def p_expression_number(t):
function p_expression_name (line 50) | def p_expression_name(t):
function p_error (line 58) | def p_error(t):
FILE: xonsh/ply/test/pkg_test2/parsing/calclex.py
function t_NUMBER (line 24) | def t_NUMBER(t):
function t_newline (line 35) | def t_newline(t):
function t_error (line 39) | def t_error(t):
FILE: xonsh/ply/test/pkg_test2/parsing/calcparse.py
function p_statement_assign (line 20) | def p_statement_assign(t):
function p_statement_expr (line 24) | def p_statement_expr(t):
function p_expression_binop (line 28) | def p_expression_binop(t):
function p_expression_uminus (line 38) | def p_expression_uminus(t):
function p_expression_group (line 42) | def p_expression_group(t):
function p_expression_number (line 46) | def p_expression_number(t):
function p_expression_name (line 50) | def p_expression_name(t):
function p_error (line 58) | def p_error(t):
FILE: xonsh/ply/test/pkg_test3/parsing/calclex.py
function t_NUMBER (line 24) | def t_NUMBER(t):
function t_newline (line 35) | def t_newline(t):
function t_error (line 39) | def t_error(t):
FILE: xonsh/ply/test/pkg_test3/parsing/calcparse.py
function p_statement_assign (line 20) | def p_statement_assign(t):
function p_statement_expr (line 24) | def p_statement_expr(t):
function p_expression_binop (line 28) | def p_expression_binop(t):
function p_expression_uminus (line 38) | def p_expression_uminus(t):
function p_expression_group (line 42) | def p_expression_group(t):
function p_expression_number (line 46) | def p_expression_number(t):
function p_expression_name (line 50) | def p_expression_name(t):
function p_error (line 58) | def p_error(t):
FILE: xonsh/ply/test/pkg_test4/__init__.py
function patched_open (line 12) | def patched_open(filename, mode):
FILE: xonsh/ply/test/pkg_test4/parsing/calclex.py
function t_NUMBER (line 24) | def t_NUMBER(t):
function t_newline (line 35) | def t_newline(t):
function t_error (line 39) | def t_error(t):
FILE: xonsh/ply/test/pkg_test4/parsing/calcparse.py
function p_statement_assign (line 20) | def p_statement_assign(t):
function p_statement_expr (line 24) | def p_statement_expr(t):
function p_expression_binop (line 28) | def p_expression_binop(t):
function p_expression_uminus (line 38) | def p_expression_uminus(t):
function p_expression_group (line 42) | def p_expression_group(t):
function p_expression_number (line 46) | def p_expression_number(t):
function p_expression_name (line 50) | def p_expression_name(t):
function p_error (line 58) | def p_error(t):
FILE: xonsh/ply/test/pkg_test5/parsing/calclex.py
function t_NUMBER (line 24) | def t_NUMBER(t):
function t_newline (line 35) | def t_newline(t):
function t_error (line 39) | def t_error(t):
FILE: xonsh/ply/test/pkg_test5/parsing/calcparse.py
function p_statement_assign (line 20) | def p_statement_assign(t):
function p_statement_expr (line 24) | def p_statement_expr(t):
function p_expression_binop (line 28) | def p_expression_binop(t):
function p_expression_uminus (line 38) | def p_expression_uminus(t):
function p_expression_group (line 42) | def p_expression_group(t):
function p_expression_number (line 46) | def p_expression_number(t):
function p_expression_name (line 50) | def p_expression_name(t):
function p_error (line 58) | def p_error(t):
FILE: xonsh/ply/test/pkg_test6/parsing/calclex.py
function t_NUMBER (line 24) | def t_NUMBER(t):
function t_newline (line 35) | def t_newline(t):
function t_error (line 39) | def t_error(t):
FILE: xonsh/ply/test/pkg_test6/parsing/calcparse.py
function p_error (line 24) | def p_error(t):
FILE: xonsh/ply/test/pkg_test6/parsing/expression.py
function p_expression_binop (line 3) | def p_expression_binop(t):
function p_expression_uminus (line 13) | def p_expression_uminus(t):
function p_expression_group (line 17) | def p_expression_group(t):
function p_expression_number (line 21) | def p_expression_number(t):
function p_expression_name (line 25) | def p_expression_name(t):
FILE: xonsh/ply/test/pkg_test6/parsing/statement.py
function p_statement_assign (line 3) | def p_statement_assign(t):
function p_statement_expr (line 7) | def p_statement_expr(t):
FILE: xonsh/ply/test/testcpp.py
function preprocessing (line 16) | def preprocessing(in_, out_queue):
class CPPTests (line 27) | class CPPTests(TestCase):
method __test_preprocessing (line 30) | def __test_preprocessing(self, in_, expected, time_limit = 1.0):
method test_infinite_argument_expansion (line 49) | def test_infinite_argument_expansion(self):
method test_concatenation (line 65) | def test_concatenation(self):
method test_deadloop_macro (line 88) | def test_deadloop_macro(self):
method test_index_error (line 103) | def test_index_error(self):
method test_evalexpr (line 118) | def test_evalexpr(self):
method test_include_nonascii (line 136) | def test_include_nonascii(self):
FILE: xonsh/ply/test/testlex.py
function make_pymodule_path (line 26) | def make_pymodule_path(filename, optimization=None):
function pymodule_out_exists (line 43) | def pymodule_out_exists(filename, optimization=None):
function pymodule_out_remove (line 47) | def pymodule_out_remove(filename, optimization=None):
function implementation (line 50) | def implementation():
function check_expected (line 60) | def check_expected(result, expected, contains=False):
function run_import (line 81) | def run_import(module):
class LexErrorWarningTests (line 87) | class LexErrorWarningTests(unittest.TestCase):
method setUp (line 88) | def setUp(self):
method tearDown (line 94) | def tearDown(self):
method test_lex_doc1 (line 97) | def test_lex_doc1(self):
method test_lex_dup1 (line 102) | def test_lex_dup1(self):
method test_lex_dup2 (line 108) | def test_lex_dup2(self):
method test_lex_dup3 (line 114) | def test_lex_dup3(self):
method test_lex_empty (line 120) | def test_lex_empty(self):
method test_lex_error1 (line 127) | def test_lex_error1(self):
method test_lex_error2 (line 133) | def test_lex_error2(self):
method test_lex_error3 (line 140) | def test_lex_error3(self):
method test_lex_error4 (line 146) | def test_lex_error4(self):
method test_lex_ignore (line 152) | def test_lex_ignore(self):
method test_lex_ignore2 (line 158) | def test_lex_ignore2(self):
method test_lex_re1 (line 165) | def test_lex_re1(self):
method test_lex_re2 (line 176) | def test_lex_re2(self):
method test_lex_re3 (line 182) | def test_lex_re3(self):
method test_lex_rule1 (line 199) | def test_lex_rule1(self):
method test_lex_rule2 (line 205) | def test_lex_rule2(self):
method test_lex_rule3 (line 211) | def test_lex_rule3(self):
method test_lex_state1 (line 218) | def test_lex_state1(self):
method test_lex_state2 (line 224) | def test_lex_state2(self):
method test_lex_state3 (line 231) | def test_lex_state3(self):
method test_lex_state4 (line 238) | def test_lex_state4(self):
method test_lex_state5 (line 245) | def test_lex_state5(self):
method test_lex_state_noerror (line 251) | def test_lex_state_noerror(self):
method test_lex_state_norule (line 257) | def test_lex_state_norule(self):
method test_lex_token1 (line 263) | def test_lex_token1(self):
method test_lex_token2 (line 273) | def test_lex_token2(self):
method test_lex_token3 (line 283) | def test_lex_token3(self):
method test_lex_token4 (line 290) | def test_lex_token4(self):
method test_lex_token5 (line 297) | def test_lex_token5(self):
method test_lex_token_dup (line 304) | def test_lex_token_dup(self):
method test_lex_literal1 (line 311) | def test_lex_literal1(self):
method test_lex_literal2 (line 317) | def test_lex_literal2(self):
class LexBuildOptionTests (line 328) | class LexBuildOptionTests(unittest.TestCase):
method setUp (line 329) | def setUp(self):
method tearDown (line 332) | def tearDown(self):
method test_lex_module (line 340) | def test_lex_module(self):
method test_lex_object (line 348) | def test_lex_object(self):
method test_lex_closure (line 356) | def test_lex_closure(self):
method test_lex_optimize (line 364) | def test_lex_optimize(self):
method test_lex_optimize2 (line 421) | def test_lex_optimize2(self):
method test_lex_optimize3 (line 474) | def test_lex_optimize3(self):
method test_lex_optimize4 (line 519) | def test_lex_optimize4(self):
method test_lex_opt_alias (line 539) | def test_lex_opt_alias(self):
method test_lex_many_tokens (line 594) | def test_lex_many_tokens(self):
class LexRunTests (line 651) | class LexRunTests(unittest.TestCase):
method setUp (line 652) | def setUp(self):
method tearDown (line 655) | def tearDown(self):
method test_lex_hedit (line 659) | def test_lex_hedit(self):
method test_lex_state_try (line 667) | def test_lex_state_try(self):
FILE: xonsh/ply/test/testyacc.py
function make_pymodule_path (line 20) | def make_pymodule_path(filename):
function pymodule_out_exists (line 36) | def pymodule_out_exists(filename):
function pymodule_out_remove (line 39) | def pymodule_out_remove(filename):
function implementation (line 42) | def implementation():
function check_expected (line 54) | def check_expected(result, expected):
function run_import (line 74) | def run_import(module):
class YaccErrorWarningTests (line 80) | class YaccErrorWarningTests(unittest.TestCase):
method setUp (line 81) | def setUp(self):
method tearDown (line 94) | def tearDown(self):
method test_yacc_badargs (line 97) | def test_yacc_badargs(self):
method test_yacc_badid (line 104) | def test_yacc_badid(self):
method test_yacc_badprec (line 112) | def test_yacc_badprec(self):
method test_yacc_badprec2 (line 120) | def test_yacc_badprec2(self):
method test_yacc_badprec3 (line 127) | def test_yacc_badprec3(self):
method test_yacc_badrule (line 136) | def test_yacc_badrule(self):
method test_yacc_badtok (line 146) | def test_yacc_badtok(self):
method test_yacc_dup (line 154) | def test_yacc_dup(self):
method test_yacc_error1 (line 164) | def test_yacc_error1(self):
method test_yacc_error2 (line 172) | def test_yacc_error2(self):
method test_yacc_error3 (line 180) | def test_yacc_error3(self):
method test_yacc_error4 (line 189) | def test_yacc_error4(self):
method test_yacc_error5 (line 197) | def test_yacc_error5(self):
method test_yacc_error6 (line 209) | def test_yacc_error6(self):
method test_yacc_error7 (line 218) | def test_yacc_error7(self):
method test_yacc_inf (line 227) | def test_yacc_inf(self):
method test_yacc_literal (line 236) | def test_yacc_literal(self):
method test_yacc_misplaced (line 242) | def test_yacc_misplaced(self):
method test_yacc_missing1 (line 249) | def test_yacc_missing1(self):
method test_yacc_nested (line 256) | def test_yacc_nested(self):
method test_yacc_nodoc (line 265) | def test_yacc_nodoc(self):
method test_yacc_noerror (line 273) | def test_yacc_noerror(self):
method test_yacc_nop (line 281) | def test_yacc_nop(self):
method test_yacc_notfunc (line 289) | def test_yacc_notfunc(self):
method test_yacc_notok (line 298) | def test_yacc_notok(self):
method test_yacc_rr (line 306) | def test_yacc_rr(self):
method test_yacc_rr_unused (line 317) | def test_yacc_rr_unused(self):
method test_yacc_simple (line 333) | def test_yacc_simple(self):
method test_yacc_sr (line 340) | def test_yacc_sr(self):
method test_yacc_term1 (line 348) | def test_yacc_term1(self):
method test_yacc_unicode_literals (line 355) | def test_yacc_unicode_literals(self):
method test_yacc_unused (line 362) | def test_yacc_unused(self):
method test_yacc_unused_rule (line 370) | def test_yacc_unused_rule(self):
method test_yacc_uprec (line 380) | def test_yacc_uprec(self):
method test_yacc_uprec2 (line 387) | def test_yacc_uprec2(self):
method test_yacc_prec1 (line 394) | def test_yacc_prec1(self):
method test_pkg_test1 (line 404) | def test_pkg_test1(self):
method test_pkg_test2 (line 412) | def test_pkg_test2(self):
method test_pkg_test3 (line 420) | def test_pkg_test3(self):
method test_pkg_test4 (line 428) | def test_pkg_test4(self):
method test_pkg_test5 (line 436) | def test_pkg_test5(self):
method test_pkg_test6 (line 444) | def test_pkg_test6(self):
FILE: xonsh/ply/test/yacc_badargs.py
function p_statement_assign (line 23) | def p_statement_assign(t,s):
function p_statement_expr (line 27) | def p_statement_expr():
function p_expression_binop (line 31) | def p_expression_binop(t):
function p_expression_uminus (line 41) | def p_expression_uminus(t):
function p_expression_group (line 45) | def p_expression_group(t):
function p_expression_number (line 49) | def p_expression_number(t):
function p_expression_name (line 53) | def p_expression_name(t):
function p_error (line 61) | def p_error(t):
FILE: xonsh/ply/test/yacc_badid.py
function p_statement_assign (line 23) | def p_statement_assign(t):
function p_statement_expr (line 27) | def p_statement_expr(t):
function p_statement_expr2 (line 31) | def p_statement_expr2(t):
function p_badrule (line 35) | def p_badrule(t):
function p_expression_binop (line 40) | def p_expression_binop(t):
function p_expression_uminus (line 50) | def p_expression_uminus(t):
function p_expression_group (line 54) | def p_expression_group(t):
function p_expression_number (line 58) | def p_expression_number(t):
function p_expression_name (line 62) | def p_expression_name(t):
function p_error (line 70) | def p_error(t):
FILE: xonsh/ply/test/yacc_badprec.py
function p_statement_assign (line 19) | def p_statement_assign(t):
function p_statement_expr (line 23) | def p_statement_expr(t):
function p_expression_binop (line 27) | def p_expression_binop(t):
function p_expression_uminus (line 37) | def p_expression_uminus(t):
function p_expression_group (line 41) | def p_expression_group(t):
function p_expression_number (line 45) | def p_expression_number(t):
function p_expression_name (line 49) | def p_expression_name(t):
function p_error (line 57) | def p_error(t):
FILE: xonsh/ply/test/yacc_badprec2.py
function p_statement_assign (line 23) | def p_statement_assign(t):
function p_statement_expr (line 27) | def p_statement_expr(t):
function p_expression_binop (line 31) | def p_expression_binop(t):
function p_expression_uminus (line 41) | def p_expression_uminus(t):
function p_expression_group (line 45) | def p_expression_group(t):
function p_expression_number (line 49) | def p_expression_number(t):
function p_expression_name (line 53) | def p_expression_name(t):
function p_error (line 61) | def p_error(t):
FILE: xonsh/ply/test/yacc_badprec3.py
function p_statement_assign (line 23) | def p_statement_assign(t):
function p_statement_expr (line 27) | def p_statement_expr(t):
function p_expression_binop (line 31) | def p_expression_binop(t):
function p_expression_uminus (line 41) | def p_expression_uminus(t):
function p_expression_group (line 45) | def p_expression_group(t):
function p_expression_number (line 49) | def p_expression_number(t):
function p_expression_name (line 53) | def p_expression_name(t):
function p_error (line 61) | def p_error(t):
FILE: xonsh/ply/test/yacc_badrule.py
function p_statement_assign (line 23) | def p_statement_assign(t):
function p_statement_expr (line 27) | def p_statement_expr(t):
function p_expression_binop (line 31) | def p_expression_binop(t):
function p_expression_uminus (line 41) | def p_expression_uminus(t):
function p_expression_group (line 45) | def p_expression_group(t):
function p_expression_number (line 49) | def p_expression_number(t):
function p_expression_name (line 53) | def p_expression_name(t):
function p_error (line 61) | def p_error(t):
FILE: xonsh/ply/test/yacc_badtok.py
function p_statement_assign (line 23) | def p_statement_assign(t):
function p_statement_expr (line 27) | def p_statement_expr(t):
function p_expression_binop (line 31) | def p_expression_binop(t):
function p_expression_uminus (line 41) | def p_expression_uminus(t):
function p_expression_group (line 45) | def p_expression_group(t):
function p_expression_number (line 49) | def p_expression_number(t):
function p_expression_name (line 53) | def p_expression_name(t):
function p_error (line 61) | def p_error(t):
FILE: xonsh/ply/test/yacc_dup.py
function p_statement (line 23) | def p_statement(t):
function p_statement (line 27) | def p_statement(t):
function p_expression_binop (line 31) | def p_expression_binop(t):
function p_expression_uminus (line 41) | def p_expression_uminus(t):
function p_expression_group (line 45) | def p_expression_group(t):
function p_expression_number (line 49) | def p_expression_number(t):
function p_expression_name (line 53) | def p_expression_name(t):
function p_error (line 61) | def p_error(t):
FILE: xonsh/ply/test/yacc_error1.py
function p_statement_assign (line 23) | def p_statement_assign(t):
function p_statement_expr (line 27) | def p_statement_expr(t):
function p_expression_binop (line 31) | def p_expression_binop(t):
function p_expression_uminus (line 41) | def p_expression_uminus(t):
function p_expression_group (line 45) | def p_expression_group(t):
function p_expression_number (line 49) | def p_expression_number(t):
function p_expression_name (line 53) | def p_expression_name(t):
function p_error (line 61) | def p_error(t,s):
FILE: xonsh/ply/test/yacc_error2.py
function p_statement_assign (line 23) | def p_statement_assign(t):
function p_statement_expr (line 27) | def p_statement_expr(t):
function p_expression_binop (line 31) | def p_expression_binop(t):
function p_expression_uminus (line 41) | def p_expression_uminus(t):
function p_expression_group (line 45) | def p_expression_group(t):
function p_expression_number (line 49) | def p_expression_number(t):
function p_expression_name (line 53) | def p_expression_name(t):
function p_error (line 61) | def p_error():
FILE: xonsh/ply/test/yacc_error3.py
function p_statement_assign (line 23) | def p_statement_assign(t):
function p_statement_expr (line 27) | def p_statement_expr(t):
function p_expression_binop (line 31) | def p_expression_binop(t):
function p_expression_uminus (line 41) | def p_expression_uminus(t):
function p_expression_group (line 45) | def p_expression_group(t):
function p_expression_number (line 49) | def p_expression_number(t):
function p_expression_name (line 53) | def p_expression_name(t):
FILE: xonsh/ply/test/yacc_error4.py
function p_statement_assign (line 23) | def p_statement_assign(t):
function p_statement_expr (line 27) | def p_statement_expr(t):
function p_expression_binop (line 31) | def p_expression_binop(t):
function p_expression_uminus (line 41) | def p_expression_uminus(t):
function p_expression_group (line 45) | def p_expression_group(t):
function p_expression_number (line 49) | def p_expression_number(t):
function p_expression_name (line 53) | def p_expression_name(t):
function p_error_handler (line 61) | def p_error_handler(t):
function p_error (line 65) | def p_error(t):
FILE: xonsh/ply/test/yacc_error5.py
function p_statement_assign (line 23) | def p_statement_assign(t):
function p_statement_assign_error (line 27) | def p_statement_assign_error(t):
function p_statement_expr (line 33) | def p_statement_expr(t):
function p_expression_binop (line 37) | def p_expression_binop(t):
function p_expression_uminus (line 47) | def p_expression_uminus(t):
function p_expression_group (line 51) | def p_expression_group(t):
function p_expression_group_error (line 58) | def p_expression_group_error(t):
function p_expression_number (line 65) | def p_expression_number(t):
function p_expression_name (line 69) | def p_expression_name(t):
function p_error (line 77) | def p_error(t):
FILE: xonsh/ply/test/yacc_error6.py
function p_statements (line 20) | def p_statements(t):
function p_statements_1 (line 24) | def p_statements_1(t):
function p_statement_assign (line 28) | def p_statement_assign(p):
function p_statement_expr (line 32) | def p_statement_expr(t):
function p_expression_binop (line 36) | def p_expression_binop(t):
function p_expression_uminus (line 46) | def p_expression_uminus(t):
function p_expression_number (line 50) | def p_expression_number(t):
function p_error (line 54) | def p_error(p):
FILE: xonsh/ply/test/yacc_error7.py
function p_statements (line 20) | def p_statements(t):
function p_statements_1 (line 24) | def p_statements_1(t):
function p_statement_assign (line 28) | def p_statement_assign(p):
function p_statement_expr (line 32) | def p_statement_expr(t):
function p_expression_binop (line 36) | def p_expression_binop(t):
function p_expression_uminus (line 46) | def p_expression_uminus(t):
function p_expression_number (line 50) | def p_expression_number(t):
function p_error (line 54) | def p_error(p):
FILE: xonsh/ply/test/yacc_inf.py
function p_statement_assign (line 23) | def p_statement_assign(t):
function p_statement_expr (line 27) | def p_statement_expr(t):
function p_expression_binop (line 31) | def p_expression_binop(t):
function p_expression_uminus (line 41) | def p_expression_uminus(t):
function p_expression_group (line 45) | def p_expression_group(t):
function p_error (line 49) | def p_error(t):
FILE: xonsh/ply/test/yacc_literal.py
function p_statement_assign (line 23) | def p_statement_assign(t):
function p_statement_expr (line 27) | def p_statement_expr(t):
function p_expression_binop (line 31) | def p_expression_binop(t):
function p_expression_uminus (line 42) | def p_expression_uminus(t):
function p_expression_group (line 46) | def p_expression_group(t):
function p_expression_number (line 50) | def p_expression_number(t):
function p_expression_name (line 54) | def p_expression_name(t):
function p_error (line 62) | def p_error(t):
FILE: xonsh/ply/test/yacc_misplaced.py
function p_statement_assign (line 23) | def p_statement_assign(t):
function p_statement_expr (line 27) | def p_statement_expr(t):
function p_expression_binop (line 31) | def p_expression_binop(t):
function p_expression_uminus (line 41) | def p_expression_uminus(t):
function p_expression_group (line 45) | def p_expression_group(t):
function p_expression_number (line 49) | def p_expression_number(t):
function p_expression_name (line 53) | def p_expression_name(t):
function p_error (line 61) | def p_error(t):
FILE: xonsh/ply/test/yacc_missing1.py
function p_statement_assign (line 23) | def p_statement_assign(t):
function p_statement_expr (line 27) | def p_statement_expr(t):
function p_expression_binop (line 31) | def p_expression_binop(t):
function p_expression_uminus (line 41) | def p_expression_uminus(t):
function p_expression_group (line 45) | def p_expression_group(t):
function p_expression_number (line 49) | def p_expression_number(t):
function p_expression_name (line 53) | def p_expression_name(t):
function p_error (line 61) | def p_error(t):
FILE: xonsh/ply/test/yacc_nested.py
function t_error (line 15) | def t_error(t):
function p_error (line 18) | def p_error(p):
function p_start (line 21) | def p_start(t):
function p_nest (line 25) | def p_nest(t):
FILE: xonsh/ply/test/yacc_nodoc.py
function p_statement_assign (line 23) | def p_statement_assign(t):
function p_statement_expr (line 27) | def p_statement_expr(t):
function p_expression_binop (line 30) | def p_expression_binop(t):
function p_expression_uminus (line 40) | def p_expression_uminus(t):
function p_expression_group (line 44) | def p_expression_group(t):
function p_expression_number (line 48) | def p_expression_number(t):
function p_expression_name (line 52) | def p_expression_name(t):
function p_error (line 60) | def p_error(t):
FILE: xonsh/ply/test/yacc_noerror.py
function p_statement_assign (line 23) | def p_statement_assign(t):
function p_statement_expr (line 27) | def p_statement_expr(t):
function p_expression_binop (line 31) | def p_expression_binop(t):
function p_expression_uminus (line 41) | def p_expression_uminus(t):
function p_expression_group (line 45) | def p_expression_group(t):
function p_expression_number (line 49) | def p_expression_number(t):
function p_expression_name (line 53) | def p_expression_name(t):
FILE: xonsh/ply/test/yacc_nop.py
function p_statement_assign (line 23) | def p_statement_assign(t):
function statement_expr (line 27) | def statement_expr(t):
function p_expression_binop (line 31) | def p_expression_binop(t):
function p_expression_uminus (line 41) | def p_expression_uminus(t):
function p_expression_group (line 45) | def p_expression_group(t):
function p_expression_number (line 49) | def p_expression_number(t):
function p_expression_name (line 53) | def p_expression_name(t):
function p_error (line 61) | def p_error(t):
FILE: xonsh/ply/test/yacc_notfunc.py
function p_statement_expr (line 25) | def p_statement_expr(t):
function p_expression_binop (line 29) | def p_expression_binop(t):
function p_expression_uminus (line 39) | def p_expression_uminus(t):
function p_expression_group (line 43) | def p_expression_group(t):
function p_expression_number (line 47) | def p_expression_number(t):
function p_expression_name (line 51) | def p_expression_name(t):
function p_error (line 59) | def p_error(t):
FILE: xonsh/ply/test/yacc_notok.py
function p_statement_assign (line 22) | def p_statement_assign(t):
function p_statement_expr (line 26) | def p_statement_expr(t):
function p_expression_binop (line 30) | def p_expression_binop(t):
function p_expression_uminus (line 40) | def p_expression_uminus(t):
function p_expression_group (line 44) | def p_expression_group(t):
function p_expression_number (line 48) | def p_expression_number(t):
function p_expression_name (line 52) | def p_expression_name(t):
function p_error (line 60) | def p_error(t):
FILE: xonsh/ply/test/yacc_prec1.py
function p_statement_assign (line 23) | def p_statement_assign(t):
function p_statement_expr (line 27) | def p_statement_expr(t):
function p_expression_binop (line 31) | def p_expression_binop(t):
function p_expression_uminus (line 41) | def p_expression_uminus(t):
function p_expression_group (line 45) | def p_expression_group(t):
function p_expression_number (line 49) | def p_expression_number(t):
function p_expression_name (line 53) | def p_expression_name(t):
function p_error (line 61) | def p_error(t):
FILE: xonsh/ply/test/yacc_rr.py
function p_statement_assign (line 23) | def p_statement_assign(t):
function p_statement_assign_2 (line 27) | def p_statement_assign_2(t):
function p_statement_expr (line 31) | def p_statement_expr(t):
function p_expression_binop (line 35) | def p_expression_binop(t):
function p_expression_uminus (line 45) | def p_expression_uminus(t):
function p_expression_group (line 49) | def p_
Condensed preview — 357 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (2,594K chars).
[
{
"path": ".gitignore",
"chars": 1240,
"preview": "# Byte-compiled / optimized / DLL files\n__pycache__/\n*.py[cod]\n*$py.class\n\n# C extensions\n*.so\n\n# Distribution / packagi"
},
{
"path": ".gitsomeconfig",
"chars": 453,
"preview": "[github]\nuser_login = None\nenable_avatar = True\nverify_ssl = True\nclr_primary = None\nclr_secondary = green\nclr_tertiary "
},
{
"path": ".gitsomeconfigurl",
"chars": 61,
"preview": "[url]\nurl_list = ['https://github.com/octocat/spoon-knife']\n\n"
},
{
"path": ".travis.yml",
"chars": 301,
"preview": "language: python\nmatrix:\n include:\n - python: 3.5\n env: TOXENV=py35\n - python: 3.6\n env: TOXENV=py36\n "
},
{
"path": "CHANGELOG.md",
"chars": 7824,
"preview": "\n\ngitsome\n=======\n\n[ {\n COMPREPLY=( $( env COMP_WORDS=\"${COMP_WORDS[*]}\" \\\n COMP_CWORD=$COMP_CWORD \\\n "
},
{
"path": "scripts/gitsome",
"chars": 60,
"preview": "#!/usr/bin/env python -u\nfrom xonsh.main import main\nmain()\n"
},
{
"path": "scripts/gitsome.bat",
"chars": 33,
"preview": "@echo off\r\npython -m xonsh.main\r\n"
},
{
"path": "scripts/run_code_checks.sh",
"chars": 242,
"preview": "#!/usr/bin/env bash\n\nflake8 --max-line-length=80 --exclude=build,docs,scratch,docs,html2text.py,compat.py,xonsh,lib,pars"
},
{
"path": "scripts/set_changelog_as_readme.sh",
"chars": 54,
"preview": "mv README.md README_temp.md\ncp CHANGELOG.rst README.md"
},
{
"path": "scripts/set_changelog_as_readme_undo.sh",
"chars": 27,
"preview": "mv README_temp.md README.md"
},
{
"path": "scripts/update_docs.sh",
"chars": 78,
"preview": "#!/usr/bin/env bash\n\nscripts/create_readme_rst.sh\npython setup.py build_sphinx"
},
{
"path": "scripts/upload_pypi.sh",
"chars": 339,
"preview": "#!/usr/bin/env bash\n\n# N. Set CHANGELOG as `README.md`\nscripts/set_changelog_as_readme.sh\n# O. Register package with PyP"
},
{
"path": "scripts/xonsh",
"chars": 60,
"preview": "#!/usr/bin/env python -u\nfrom xonsh.main import main\nmain()\n"
},
{
"path": "scripts/xonsh.bat",
"chars": 33,
"preview": "@echo off\r\npython -m xonsh.main\r\n"
},
{
"path": "setup.py",
"chars": 3931,
"preview": "#!/usr/bin/env python\n# coding=utf-8\n\n\"\"\"The gitsome installer.\"\"\"\nfrom __future__ import print_function, unicode_litera"
},
{
"path": "tests/__init__.py",
"chars": 578,
"preview": "# -*- coding: utf-8 -*-\n\n# Copyright 2015 Donne Martin. All Rights Reserved.\n#\n# Licensed under the Apache License, Vers"
},
{
"path": "tests/compat.py",
"chars": 679,
"preview": "# -*- coding: utf-8 -*-\n\n# Copyright 2015 Donne Martin. All Rights Reserved.\n#\n# Licensed under the Apache License, Vers"
},
{
"path": "tests/data/__init__.py",
"chars": 578,
"preview": "# -*- coding: utf-8 -*-\n\n# Copyright 2015 Donne Martin. All Rights Reserved.\n#\n# Licensed under the Apache License, Vers"
},
{
"path": "tests/data/email.py",
"chars": 849,
"preview": "# -*- coding: utf-8 -*-\n\n# Copyright 2015 Donne Martin. All Rights Reserved.\n#\n# Licensed under the Apache License, Vers"
},
{
"path": "tests/data/emoji.py",
"chars": 806,
"preview": "# -*- coding: utf-8 -*-\n\n# Copyright 2015 Donne Martin. All Rights Reserved.\n#\n# Licensed under the Apache License, Vers"
},
{
"path": "tests/data/events.py",
"chars": 2350,
"preview": "# -*- coding: utf-8 -*-\n\n# Copyright 2015 Donne Martin. All Rights Reserved.\n#\n# Licensed under the Apache License, Vers"
},
{
"path": "tests/data/gitignores.py",
"chars": 990,
"preview": "# -*- coding: utf-8 -*-\n\n# Copyright 2015 Donne Martin. All Rights Reserved.\n#\n# Licensed under the Apache License, Vers"
},
{
"path": "tests/data/issue.py",
"chars": 2196,
"preview": "# -*- coding: utf-8 -*-\n\n# Copyright 2015 Donne Martin. All Rights Reserved.\n#\n# Licensed under the Apache License, Vers"
},
{
"path": "tests/data/license.py",
"chars": 1168,
"preview": "# -*- coding: utf-8 -*-\n\n# Copyright 2015 Donne Martin. All Rights Reserved.\n#\n# Licensed under the Apache License, Vers"
},
{
"path": "tests/data/markdown.py",
"chars": 81607,
"preview": "# -*- coding: utf-8 -*-\n\n# Copyright 2015 Donne Martin. All Rights Reserved.\n#\n# Licensed under the Apache License, Vers"
},
{
"path": "tests/data/thread.py",
"chars": 1319,
"preview": "# -*- coding: utf-8 -*-\n\n# Copyright 2015 Donne Martin. All Rights Reserved.\n#\n# Licensed under the Apache License, Vers"
},
{
"path": "tests/data/trends.py",
"chars": 4999,
"preview": "# -*- coding: utf-8 -*-\n\n# Copyright 2015 Donne Martin. All Rights Reserved.\n#\n# Licensed under the Apache License, Vers"
},
{
"path": "tests/data/user.py",
"chars": 1742,
"preview": "# -*- coding: utf-8 -*-\n\n# Copyright 2015 Donne Martin. All Rights Reserved.\n#\n# Licensed under the Apache License, Vers"
},
{
"path": "tests/data/user_feed.py",
"chars": 5129,
"preview": "# -*- coding: utf-8 -*-\n\n# Copyright 2015 Donne Martin. All Rights Reserved.\n#\n# Licensed under the Apache License, Vers"
},
{
"path": "tests/mock_feed_parser.py",
"chars": 973,
"preview": "# -*- coding: utf-8 -*-\n\n# Copyright 2015 Donne Martin. All Rights Reserved.\n#\n# Licensed under the Apache License, Vers"
},
{
"path": "tests/mock_github_api.py",
"chars": 11316,
"preview": "# -*- coding: utf-8 -*-\n\n# Copyright 2015 Donne Martin. All Rights Reserved.\n#\n# Licensed under the Apache License, Vers"
},
{
"path": "tests/mock_pretty_date_time.py",
"chars": 714,
"preview": "# -*- coding: utf-8 -*-\n\n# Copyright 2015 Donne Martin. All Rights Reserved.\n#\n# Licensed under the Apache License, Vers"
},
{
"path": "tests/run_tests.py",
"chars": 993,
"preview": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n# Copyright 2015 Donne Martin. All Rights Reserved.\n#\n# Licensed under th"
},
{
"path": "tests/test_completer.py",
"chars": 4797,
"preview": "# -*- coding: utf-8 -*-\n\n# Copyright 2015 Donne Martin. All Rights Reserved.\n#\n# Licensed under the Apache License, Vers"
},
{
"path": "tests/test_config.py",
"chars": 10428,
"preview": "# -*- coding: utf-8 -*-\n\n# Copyright 2015 Donne Martin. All Rights Reserved.\n#\n# Licensed under the Apache License, Vers"
},
{
"path": "tests/test_github.py",
"chars": 14018,
"preview": "# -*- coding: utf-8 -*-\n\n# Copyright 2015 Donne Martin. All Rights Reserved.\n#\n# Licensed under the Apache License, Vers"
},
{
"path": "tests/test_github_cli.py",
"chars": 12334,
"preview": "# -*- coding: utf-8 -*-\n\n# Copyright 2015 Donne Martin. All Rights Reserved.\n#\n# Licensed under the Apache License, Vers"
},
{
"path": "tests/test_web_viewer.py",
"chars": 1981,
"preview": "# -*- coding: utf-8 -*-\n\n# Copyright 2015 Donne Martin. All Rights Reserved.\n#\n# Licensed under the Apache License, Vers"
},
{
"path": "tox.ini",
"chars": 554,
"preview": "# Tox (http://tox.testrun.org/) is a tool for running tests\n# in multiple virtualenvs. This configuration file will run "
},
{
"path": "xonsh/__init__.py",
"chars": 3886,
"preview": "__version__ = \"0.8.10\"\n\n\n# amalgamate exclude jupyter_kernel parser_table parser_test_table pyghooks\n# amalgamate exclud"
},
{
"path": "xonsh/__main__.py",
"chars": 36,
"preview": "from xonsh.main import main\n\nmain()\n"
},
{
"path": "xonsh/aliases.py",
"chars": 27421,
"preview": "# -*- coding: utf-8 -*-\n\"\"\"Aliases for the xonsh shell.\"\"\"\nimport os\nimport re\nimport sys\nimport inspect\nimport argparse"
},
{
"path": "xonsh/ansi_colors.py",
"chars": 32620,
"preview": "\"\"\"Tools for helping with ANSI color codes.\"\"\"\nimport re\nimport sys\nimport warnings\nimport builtins\n\nfrom xonsh.platform"
},
{
"path": "xonsh/ast.py",
"chars": 19088,
"preview": "# -*- coding: utf-8 -*-\n\"\"\"The xonsh abstract syntax tree node.\"\"\"\n# These are imported into our module namespace for th"
},
{
"path": "xonsh/base_shell.py",
"chars": 20050,
"preview": "# -*- coding: utf-8 -*-\n\"\"\"The base class for xonsh shell\"\"\"\nimport io\nimport os\nimport sys\nimport time\nimport builtins\n"
},
{
"path": "xonsh/built_ins.py",
"chars": 53830,
"preview": "# -*- coding: utf-8 -*-\n\"\"\"The xonsh built-ins.\n\nNote that this module is named 'built_ins' so as not to be confused wit"
},
{
"path": "xonsh/codecache.py",
"chars": 6345,
"preview": "\"\"\"Tools for caching xonsh code.\"\"\"\nimport os\nimport sys\nimport hashlib\nimport marshal\nimport builtins\n\nfrom xonsh impor"
},
{
"path": "xonsh/color_tools.py",
"chars": 10765,
"preview": "\"\"\"Tools for color handling in xonsh.\n\nThis includes Convert values between RGB hex codes and xterm-256\ncolor codes. Par"
},
{
"path": "xonsh/commands_cache.py",
"chars": 15424,
"preview": "# -*- coding: utf-8 -*-\n\"\"\"Module for caching command & alias names as well as for predicting whether\na command will be "
},
{
"path": "xonsh/completer.py",
"chars": 1618,
"preview": "# -*- coding: utf-8 -*-\n\"\"\"A (tab-)completer for xonsh.\"\"\"\nimport builtins\nimport collections.abc as cabc\n\n\nclass Comple"
},
{
"path": "xonsh/completers/__init__.py",
"chars": 1552,
"preview": "# amalgamate exclude\nimport os as _os\n\nif _os.getenv(\"XONSH_DEBUG\", \"\"):\n pass\nelse:\n import sys as _sys\n\n try:"
},
{
"path": "xonsh/completers/_aliases.py",
"chars": 6634,
"preview": "import builtins\nimport collections\n\nimport xonsh.lazyasd as xl\n\nfrom xonsh.completers.tools import justify\n\n\nVALID_ACTIO"
},
{
"path": "xonsh/completers/base.py",
"chars": 1142,
"preview": "\"\"\"Base completer for xonsh.\"\"\"\nimport collections.abc as cabc\n\nfrom xonsh.completers.path import complete_path\nfrom xon"
},
{
"path": "xonsh/completers/bash.py",
"chars": 646,
"preview": "\"\"\"Xonsh hooks into bash completions.\"\"\"\nimport builtins\n\nimport xonsh.platform as xp\nfrom xonsh.completers.path import "
},
{
"path": "xonsh/completers/bash_completion.py",
"chars": 13275,
"preview": "\"\"\"This module provides the implementation for the retrieving completion results\nfrom bash.\n\"\"\"\n# developer note: this f"
},
{
"path": "xonsh/completers/commands.py",
"chars": 1792,
"preview": "import os\nimport builtins\n\nimport xonsh.tools as xt\nimport xonsh.platform as xp\n\nfrom xonsh.completers.tools import get_"
},
{
"path": "xonsh/completers/completer.py",
"chars": 1063,
"preview": "import builtins\n\n\ndef complete_completer(prefix, line, start, end, ctx):\n \"\"\"\n Completion for \"completer\"\n \"\"\"\n"
},
{
"path": "xonsh/completers/dirs.py",
"chars": 807,
"preview": "from xonsh.completers.man import complete_from_man\nfrom xonsh.completers.path import complete_dir\n\n\ndef complete_cd(pref"
},
{
"path": "xonsh/completers/init.py",
"chars": 1380,
"preview": "\"\"\"Constructor for xonsh completer objects.\"\"\"\nimport collections\n\nfrom xonsh.completers.pip import complete_pip\nfrom xo"
},
{
"path": "xonsh/completers/man.py",
"chars": 1676,
"preview": "import os\nimport re\nimport pickle\nimport builtins\nimport subprocess\n\nimport xonsh.lazyasd as xl\n\nfrom xonsh.completers.t"
},
{
"path": "xonsh/completers/path.py",
"chars": 10019,
"preview": "import os\nimport re\nimport ast\nimport glob\nimport builtins\n\nimport xonsh.tools as xt\nimport xonsh.platform as xp\nimport "
},
{
"path": "xonsh/completers/pip.py",
"chars": 1652,
"preview": "\"\"\"Completers for pip.\"\"\"\n# pylint: disable=invalid-name, missing-docstring, unsupported-membership-test\n# pylint: disab"
},
{
"path": "xonsh/completers/python.py",
"chars": 7462,
"preview": "\"\"\"Completers for Python code\"\"\"\nimport re\nimport sys\nimport inspect\nimport builtins\nimport importlib\nimport collections"
},
{
"path": "xonsh/completers/tools.py",
"chars": 830,
"preview": "\"\"\"Xonsh completer tools.\"\"\"\nimport builtins\nimport textwrap\n\n\ndef _filter_normal(s, x):\n return s.startswith(x)\n\n\nde"
},
{
"path": "xonsh/completers/xompletions.py",
"chars": 1351,
"preview": "\"\"\"Provides completions for xonsh internal utilities\"\"\"\n\nimport xonsh.xontribs as xx\nimport xonsh.tools as xt\n\n\ndef comp"
},
{
"path": "xonsh/contexts.py",
"chars": 3985,
"preview": "\"\"\"Context management tools for xonsh.\"\"\"\nimport sys\nimport textwrap\nimport builtins\nfrom collections.abc import Mapping"
},
{
"path": "xonsh/data/data.txt",
"chars": 6826,
"preview": "(u'vnpy', 363)\n(u'thoppe', 104)\n(u'edc', 114)\n(u'projectatomic', 110)\n(u'jrosebr1', 289)\n(u'compose', 305)\n(u'4148', 163"
},
{
"path": "xonsh/diff_history.py",
"chars": 12047,
"preview": "# -*- coding: utf-8 -*-\n\"\"\"Tools for diff'ing two xonsh history files in a meaningful fashion.\"\"\"\nimport difflib\nimport "
},
{
"path": "xonsh/dirstack.py",
"chars": 17023,
"preview": "# -*- coding: utf-8 -*-\n\"\"\"Directory stack and associated utilities for the xonsh shell.\"\"\"\nimport os\nimport glob\nimport"
},
{
"path": "xonsh/dumb_shell.py",
"chars": 402,
"preview": "\"\"\"A dumb shell for when $TERM == 'dumb', which usually happens in emacs.\"\"\"\nimport builtins\n\nfrom xonsh.readline_shell "
},
{
"path": "xonsh/environ.py",
"chars": 65220,
"preview": "# -*- coding: utf-8 -*-\n\"\"\"Environment for the xonsh shell.\"\"\"\nimport os\nimport re\nimport sys\nimport pprint\nimport textw"
},
{
"path": "xonsh/events.py",
"chars": 10267,
"preview": "\"\"\"\nEvents for xonsh.\n\nIn all likelihood, you want builtins.events\n\nThe best way to \"declare\" an event is something like"
},
{
"path": "xonsh/execer.py",
"chars": 12739,
"preview": "# -*- coding: utf-8 -*-\n\"\"\"Implements the xonsh executer.\"\"\"\nimport sys\nimport types\nimport inspect\nimport builtins\nimpo"
},
{
"path": "xonsh/foreign_shells.py",
"chars": 22673,
"preview": "# -*- coding: utf-8 -*-\n\"\"\"Tools to help interface with foreign shells, such as Bash.\"\"\"\nimport os\nimport re\nimport json"
},
{
"path": "xonsh/fs.py",
"chars": 3317,
"preview": "\"\"\"\nBackported functions to implement the PEP 519 (Adding a file system path protocol) API.\n\"\"\"\n\nimport abc\nimport sys\ni"
},
{
"path": "xonsh/history/__init__.py",
"chars": 693,
"preview": "# amalgamate exclude\nimport os as _os\n\nif _os.getenv(\"XONSH_DEBUG\", \"\"):\n pass\nelse:\n import sys as _sys\n\n try:"
},
{
"path": "xonsh/history/base.py",
"chars": 4720,
"preview": "# -*- coding: utf-8 -*-\n\"\"\"Base class of Xonsh History backends.\"\"\"\nimport types\nimport uuid\n\n\nclass HistoryEntry(types."
},
{
"path": "xonsh/history/dummy.py",
"chars": 620,
"preview": "# -*- coding: utf-8 -*-\n\"\"\"Implements the xonsh history backend.\"\"\"\nimport collections\nfrom xonsh.history.base import Hi"
},
{
"path": "xonsh/history/json.py",
"chars": 15283,
"preview": "# -*- coding: utf-8 -*-\n\"\"\"Implements JSON version of xonsh history backend.\"\"\"\nimport os\nimport sys\nimport time\nimport "
},
{
"path": "xonsh/history/main.py",
"chars": 13040,
"preview": "# -*- coding: utf-8 -*-\n\"\"\"Main entry points of the xonsh history.\"\"\"\nimport argparse\nimport builtins\nimport datetime\nim"
},
{
"path": "xonsh/history/sqlite.py",
"chars": 7674,
"preview": "# -*- coding: utf-8 -*-\n\"\"\"Implements the xonsh history backend via sqlite3.\"\"\"\nimport builtins\nimport collections\nimpor"
},
{
"path": "xonsh/imphooks.py",
"chars": 10227,
"preview": "# -*- coding: utf-8 -*-\n\"\"\"Import hooks for importing xonsh source files.\n\nThis module registers the hooks it defines wh"
},
{
"path": "xonsh/inspectors.py",
"chars": 27651,
"preview": "# -*- coding: utf-8 -*-\n\"\"\"Tools for inspecting Python objects.\n\nThis file was forked from the IPython project:\n\n* Copyr"
},
{
"path": "xonsh/jobs.py",
"chars": 13219,
"preview": "# -*- coding: utf-8 -*-\n\"\"\"Job control for the xonsh shell.\"\"\"\nimport os\nimport sys\nimport time\nimport ctypes\nimport sig"
},
{
"path": "xonsh/jsonutils.py",
"chars": 456,
"preview": "\"\"\"Custom tools for managing JSON serialization / deserialization of xonsh\nobjects.\n\"\"\"\nimport functools\n\nfrom xonsh.too"
},
{
"path": "xonsh/jupyter_kernel.py",
"chars": 16310,
"preview": "# -*- coding: utf-8 -*-\n\"\"\"Hooks for Jupyter Xonsh Kernel.\"\"\"\nimport sys\nimport json\nimport hmac\nimport uuid\nimport errn"
},
{
"path": "xonsh/jupyter_shell.py",
"chars": 4471,
"preview": "\"\"\"An interactive shell for the Jupyter kernel.\"\"\"\nimport io\nimport sys\nimport builtins\n\nfrom xonsh.base_shell import Ba"
},
{
"path": "xonsh/lazyasd.py",
"chars": 11216,
"preview": "\"\"\"Lazy and self destructive containers for speeding up module import.\"\"\"\n# Copyright 2015-2016, the xonsh developers. A"
},
{
"path": "xonsh/lazyimps.py",
"chars": 1427,
"preview": "\"\"\"Lazy imports that may apply across the xonsh package.\"\"\"\nimport importlib\n\nfrom xonsh.platform import ON_WINDOWS, ON_"
},
{
"path": "xonsh/lazyjson.py",
"chars": 7695,
"preview": "# -*- coding: utf-8 -*-\n\"\"\"Implements a lazy JSON file class that wraps around json data.\"\"\"\nimport io\nimport json\nimpor"
},
{
"path": "xonsh/lexer.py",
"chars": 14573,
"preview": "# -*- coding: utf-8 -*-\n\"\"\"Lexer for xonsh code.\n\nWritten using a hybrid of ``tokenize`` and PLY.\n\"\"\"\nimport io\nimport r"
},
{
"path": "xonsh/macutils.py",
"chars": 772,
"preview": "\"\"\"Provides some Mac / Darwin based utility functions for xonsh.\"\"\"\nfrom ctypes import c_uint, byref, create_string_buff"
},
{
"path": "xonsh/main.py",
"chars": 15995,
"preview": "# -*- coding: utf-8 -*-\n\"\"\"The main xonsh script.\"\"\"\nimport os\nimport sys\nimport enum\nimport argparse\nimport builtins\nim"
},
{
"path": "xonsh/openpy.py",
"chars": 4105,
"preview": "# -*- coding: utf-8 -*-\n\"\"\"Tools to open ``*.py`` files as Unicode.\n\nUses the encoding specified within the file, as per"
},
{
"path": "xonsh/parser.py",
"chars": 420,
"preview": "# -*- coding: utf-8 -*-\n\"\"\"Implements the xonsh parser.\"\"\"\nfrom xonsh.lazyasd import lazyobject\nfrom xonsh.platform impo"
},
{
"path": "xonsh/parsers/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "xonsh/parsers/base.py",
"chars": 104744,
"preview": "# -*- coding: utf-8 -*-\n\"\"\"Implements the base xonsh parser.\"\"\"\nimport os\nimport re\nimport time\nimport textwrap\nfrom thr"
},
{
"path": "xonsh/parsers/context_check.py",
"chars": 2707,
"preview": "import ast\nimport keyword\nimport collections\n\n_all_keywords = frozenset(keyword.kwlist)\n\n\ndef _not_assignable(x, augassi"
},
{
"path": "xonsh/parsers/v34.py",
"chars": 5153,
"preview": "# -*- coding: utf-8 -*-\n\"\"\"Implements the xonsh parser for Python v3.4.\"\"\"\nimport xonsh.ast as ast\nfrom xonsh.parsers.ba"
},
{
"path": "xonsh/parsers/v35.py",
"chars": 4847,
"preview": "# -*- coding: utf-8 -*-\n\"\"\"Implements the xonsh parser for Python v3.5.\"\"\"\nimport xonsh.ast as ast\nfrom xonsh.parsers.ba"
},
{
"path": "xonsh/parsers/v36.py",
"chars": 1465,
"preview": "# -*- coding: utf-8 -*-\n\"\"\"Implements the xonsh parser for Python v3.6.\"\"\"\nimport xonsh.ast as ast\nfrom xonsh.parsers.v3"
},
{
"path": "xonsh/platform.py",
"chars": 17592,
"preview": "\"\"\"Module for platform-specific constants and implementations, as well as\ncompatibility layers to make use of the 'best'"
},
{
"path": "xonsh/ply/.gitignore",
"chars": 64,
"preview": "*.pyc\n*.pyo\n__pycache__\n*.out\n*.dif\n*~\n/dist\n/build\n/*.egg-info\n"
},
{
"path": "xonsh/ply/.travis.yml",
"chars": 160,
"preview": "language: python\npython:\n - \"2.6\"\n - \"2.7\"\n - \"3.3\"\n - \"3.4\"\n - \"3.5\"\n - \"3.6\"\ninstall: true\nscript: \"cd test && p"
},
{
"path": "xonsh/ply/CHANGES",
"chars": 57383,
"preview": "Current Version\n---------------\nIMPORTANT NOTE (2018-12-22): PLY is no longer be released in any\npackage-installable for"
},
{
"path": "xonsh/ply/CONTRIBUTING.md",
"chars": 559,
"preview": "Contributing to PLY\n===================\n\nPLY is a mature project that no longer makes releases. New features\nare no long"
},
{
"path": "xonsh/ply/Makefile",
"chars": 291,
"preview": "PYTHON ?= python\n\ntest:\n\tcd test && $(PYTHON) testlex.py\n\tcd test && $(PYTHON) testyacc.py\n\nwheel:\n\t$(PYTHON) setup.py b"
},
{
"path": "xonsh/ply/README.md",
"chars": 8978,
"preview": "# PLY (Python Lex-Yacc)\n\n[](https://travis-ci.org/dab"
},
{
"path": "xonsh/ply/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "xonsh/ply/doc/internal.html",
"chars": 29177,
"preview": "<html>\n<head>\n<title>PLY Internals</title>\n</head>\n<body bgcolor=\"#ffffff\">\n\n<h1>PLY Internals</h1>\n \n<b>\nDavid M. Beazl"
},
{
"path": "xonsh/ply/doc/makedoc.py",
"chars": 5870,
"preview": "#!/usr/local/bin/python\n\n###############################################################################\n# Takes a chapt"
},
{
"path": "xonsh/ply/doc/ply.html",
"chars": 114717,
"preview": "<html>\n<head>\n<title>PLY (Python Lex-Yacc)</title>\n</head>\n<body bgcolor=\"#ffffff\">\n\n<h1>PLY (Python Lex-Yacc)</h1>\n \n<b"
},
{
"path": "xonsh/ply/example/BASIC/README",
"chars": 2511,
"preview": "Inspired by a September 14, 2006 Salon article \"Why Johnny Can't Code\" by\nDavid Brin (http://www.salon.com/tech/feature/"
},
{
"path": "xonsh/ply/example/BASIC/basic.py",
"chars": 1543,
"preview": "# An implementation of Dartmouth BASIC (1964)\n#\n\nimport sys\nsys.path.insert(0, \"../..\")\n\nif sys.version_info[0] >= 3:\n "
},
{
"path": "xonsh/ply/example/BASIC/basiclex.py",
"chars": 1115,
"preview": "# An implementation of Dartmouth BASIC (1964)\n\nfrom ply import *\n\nkeywords = (\n 'LET', 'READ', 'DATA', 'PRINT', 'GOTO"
},
{
"path": "xonsh/ply/example/BASIC/basiclog.py",
"chars": 1700,
"preview": "# An implementation of Dartmouth BASIC (1964)\n#\n\nimport sys\nsys.path.insert(0, \"../..\")\n\nif sys.version_info[0] >= 3:\n "
},
{
"path": "xonsh/ply/example/BASIC/basinterp.py",
"chars": 17753,
"preview": "# This file provides the runtime support for running a basic program\n# Assumes the program has been parsed using baspars"
},
{
"path": "xonsh/ply/example/BASIC/basparse.py",
"chars": 8850,
"preview": "# An implementation of Dartmouth BASIC (1964)\n#\n\nfrom ply import *\nimport basiclex\n\ntokens = basiclex.tokens\n\nprecedence"
},
{
"path": "xonsh/ply/example/BASIC/dim.bas",
"chars": 224,
"preview": "5 DIM A(50,15)\n10 FOR I = 1 TO 50\n20 FOR J = 1 TO 15\n30 LET A(I,J) = I + J\n35 REM PRINT I,J, A(I,J)\n40 NEXT J\n50 NEXT"
},
{
"path": "xonsh/ply/example/BASIC/func.bas",
"chars": 73,
"preview": "10 DEF FDX(X) = 2*X\n20 FOR I = 0 TO 100\n30 PRINT FDX(I)\n40 NEXT I\n50 END\n"
},
{
"path": "xonsh/ply/example/BASIC/gcd.bas",
"chars": 359,
"preview": "10 PRINT \"A\",\"B\",\"C\",\"GCD\"\n20 READ A,B,C\n30 LET X = A\n40 LET Y = B\n50 GOSUB 200\n60 LET X = G\n70 LET Y = C\n80 GOSUB 200\n9"
},
{
"path": "xonsh/ply/example/BASIC/gosub.bas",
"chars": 216,
"preview": "100 LET X = 3\n110 GOSUB 400\n120 PRINT U, V, W\n200 LET X = 5\n210 GOSUB 400\n220 LET Z = U + 2*V + 3*W\n230 PRINT Z\n240 GOTO"
},
{
"path": "xonsh/ply/example/BASIC/hello.bas",
"chars": 57,
"preview": "5 REM HELLO WORLD PROGAM\n10 PRINT \"HELLO WORLD\"\n99 END\n\n"
},
{
"path": "xonsh/ply/example/BASIC/linear.bas",
"chars": 420,
"preview": "1 REM ::: SOLVE A SYSTEM OF LINEAR EQUATIONS\n2 REM ::: A1*X1 + A2*X2 = B1\n3 REM ::: A3*X1 + A4*X2 = B2\n4 REM -------"
},
{
"path": "xonsh/ply/example/BASIC/maxsin.bas",
"chars": 217,
"preview": "5 PRINT \"X VALUE\", \"SINE\", \"RESOLUTION\"\n10 READ D\n20 LET M = -1\n30 FOR X = 0 TO 3 STEP D\n40 IF SIN(X) <= M THEN 80\n50 LE"
},
{
"path": "xonsh/ply/example/BASIC/powers.bas",
"chars": 268,
"preview": "5 PRINT \"THIS PROGRAM COMPUTES AND PRINTS THE NTH POWERS\"\n6 PRINT \"OF THE NUMBERS LESS THAN OR EQUAL TO N FOR VARIOUS\"\n7"
},
{
"path": "xonsh/ply/example/BASIC/rand.bas",
"chars": 60,
"preview": "10 FOR I = 1 TO 20\n20 PRINT INT(10*RND(0))\n30 NEXT I\n40 END\n"
},
{
"path": "xonsh/ply/example/BASIC/sales.bas",
"chars": 375,
"preview": "10 FOR I = 1 TO 3\n20 READ P(I)\n30 NEXT I\n40 FOR I = 1 TO 3\n50 FOR J = 1 TO 5\n60 READ S(I,J)\n70 NEXT J\n80 NEXT I\n90 FOR J"
},
{
"path": "xonsh/ply/example/BASIC/sears.bas",
"chars": 481,
"preview": "1 REM :: THIS PROGRAM COMPUTES HOW MANY TIMES YOU HAVE TO FOLD\n2 REM :: A PIECE OF PAPER SO THAT IT IS TALLER THAN THE\n3"
},
{
"path": "xonsh/ply/example/BASIC/sqrt1.bas",
"chars": 78,
"preview": "10 LET X = 0\n20 LET X = X + 1\n30 PRINT X, SQR(X)\n40 IF X < 100 THEN 20\n50 END\n"
},
{
"path": "xonsh/ply/example/BASIC/sqrt2.bas",
"chars": 56,
"preview": "10 FOR X = 1 TO 100\n20 PRINT X, SQR(X)\n30 NEXT X\n40 END\n"
},
{
"path": "xonsh/ply/example/GardenSnake/GardenSnake.py",
"chars": 19204,
"preview": "# GardenSnake - a parser generator demonstration program\n#\n# This implements a modified version of a subset of Python:\n#"
},
{
"path": "xonsh/ply/example/GardenSnake/README",
"chars": 245,
"preview": "This example is Andrew Dalke's GardenSnake language. It shows how to process an\nindentation-like language like Python. "
},
{
"path": "xonsh/ply/example/README",
"chars": 315,
"preview": "Simple examples:\n calc - Simple calculator\n classcalc - Simple calculate defined as a class\n \nComplex examp"
},
{
"path": "xonsh/ply/example/ansic/README",
"chars": 88,
"preview": "This example is incomplete. Was going to specify an ANSI C parser.\nThis is part of it.\n"
},
{
"path": "xonsh/ply/example/ansic/clex.py",
"chars": 3417,
"preview": "# ----------------------------------------------------------------------\n# clex.py\n#\n# A lexer for ANSI C.\n# -----------"
},
{
"path": "xonsh/ply/example/ansic/cparse.py",
"chars": 20381,
"preview": "# -----------------------------------------------------------------------------\n# cparse.py\n#\n# Simple parser for ANSI C"
},
{
"path": "xonsh/ply/example/calc/calc.py",
"chars": 2214,
"preview": "# -----------------------------------------------------------------------------\n# calc.py\n#\n# A simple calculator with v"
},
{
"path": "xonsh/ply/example/calcdebug/calc.py",
"chars": 2348,
"preview": "# -----------------------------------------------------------------------------\n# calc.py\n#\n# This example shows how to "
},
{
"path": "xonsh/ply/example/calceof/calc.py",
"chars": 2402,
"preview": "# -----------------------------------------------------------------------------\n# calc.py\n#\n# A simple calculator with v"
},
{
"path": "xonsh/ply/example/classcalc/calc.py",
"chars": 4134,
"preview": "#!/usr/bin/env python\n\n# -----------------------------------------------------------------------------\n# calc.py\n#\n# A s"
},
{
"path": "xonsh/ply/example/cleanup.sh",
"chars": 66,
"preview": "#!/bin/sh\nrm -f */*.pyc */parsetab.py */parser.out */*~ */*.class\n"
},
{
"path": "xonsh/ply/example/closurecalc/calc.py",
"chars": 3063,
"preview": "# -----------------------------------------------------------------------------\n# calc.py\n#\n# A calculator parser that m"
},
{
"path": "xonsh/ply/example/hedit/hedit.py",
"chars": 1050,
"preview": "# -----------------------------------------------------------------------------\n# hedit.py\n#\n# Paring of Fortran H Edit "
},
{
"path": "xonsh/ply/example/newclasscalc/calc.py",
"chars": 4195,
"preview": "#!/usr/bin/env python\n\n# -----------------------------------------------------------------------------\n# calc.py\n#\n# A s"
},
{
"path": "xonsh/ply/example/optcalc/README",
"chars": 195,
"preview": "An example showing how to use Python optimized mode.\nTo run:\n\n - First run 'python calc.py'\n\n - Then run 'python -OO c"
},
{
"path": "xonsh/ply/example/optcalc/calc.py",
"chars": 2535,
"preview": "# -----------------------------------------------------------------------------\n# calc.py\n#\n# A simple calculator with v"
},
{
"path": "xonsh/ply/example/unicalc/calc.py",
"chars": 2532,
"preview": "# -----------------------------------------------------------------------------\n# calc.py\n#\n# A simple calculator with v"
},
{
"path": "xonsh/ply/example/yply/README",
"chars": 1539,
"preview": "yply.py\n\nThis example implements a program yply.py that converts a UNIX-yacc\nspecification file into a PLY-compatible pr"
},
{
"path": "xonsh/ply/example/yply/ylex.py",
"chars": 2141,
"preview": "# lexer for yacc-grammars\n#\n# Author: David Beazley (dave@dabeaz.com)\n# Date : October 2, 2006\n\nimport sys\nsys.path.app"
},
{
"path": "xonsh/ply/example/yply/yparse.py",
"chars": 4934,
"preview": "# parser for Unix yacc-based grammars\n#\n# Author: David Beazley (dave@dabeaz.com)\n# Date : October 2, 2006\n\nimport ylex"
},
{
"path": "xonsh/ply/example/yply/yply.py",
"chars": 1236,
"preview": "#!/usr/local/bin/python\n# yply.py\n#\n# Author: David Beazley (dave@dabeaz.com)\n# Date : October 2, 2006\n#\n# Converts a U"
},
{
"path": "xonsh/ply/ply/__init__.py",
"chars": 103,
"preview": "# PLY package\n# Author: David Beazley (dave@dabeaz.com)\n\n__version__ = '3.11'\n__all__ = ['lex','yacc']\n"
},
{
"path": "xonsh/ply/ply/cpp.py",
"chars": 36680,
"preview": "# -----------------------------------------------------------------------------\n# ply: cpp.py\n#\n# Copyright (C) 2001-201"
},
{
"path": "xonsh/ply/ply/ctokens.py",
"chars": 3155,
"preview": "# ----------------------------------------------------------------------\n# ctokens.py\n#\n# Token specifications for symbo"
},
{
"path": "xonsh/ply/ply/lex.py",
"chars": 42941,
"preview": "# -----------------------------------------------------------------------------\n# ply: lex.py\n#\n# Copyright (C) 2001-201"
},
{
"path": "xonsh/ply/ply/yacc.py",
"chars": 137783,
"preview": "# -----------------------------------------------------------------------------\n# ply: yacc.py\n#\n# Copyright (C) 2001-20"
},
{
"path": "xonsh/ply/ply/ygen.py",
"chars": 2246,
"preview": "# ply: ygen.py\n#\n# This is a support program that auto-generates different versions of the YACC parsing\n# function with "
},
{
"path": "xonsh/ply/setup.md",
"chars": 1472,
"preview": "# Maintained, No Package Releases\n\nPLY is maintained software, but no longer produces package releases.\nThere is no `set"
},
{
"path": "xonsh/ply/test/README",
"chars": 228,
"preview": "This directory mostly contains tests for various types of error\nconditions. To run:\n\n $ python testlex.py \n $ python "
},
{
"path": "xonsh/ply/test/calclex.py",
"chars": 939,
"preview": "# -----------------------------------------------------------------------------\n# calclex.py\n# -------------------------"
},
{
"path": "xonsh/ply/test/cleanup.sh",
"chars": 58,
"preview": "#!/bin/sh\n\nrm -rf *~ *.pyc *.pyo *.dif *.out __pycache__\n\n"
},
{
"path": "xonsh/ply/test/lex_closure.py",
"chars": 1119,
"preview": "# -----------------------------------------------------------------------------\n# lex_closure.py\n# ---------------------"
},
{
"path": "xonsh/ply/test/lex_doc1.py",
"chars": 284,
"preview": "# lex_doc1.py\n#\n# Missing documentation string\n\nimport sys\nif \"..\" not in sys.path: sys.path.insert(0,\"..\")\n\nimport ply."
},
{
"path": "xonsh/ply/test/lex_dup1.py",
"chars": 295,
"preview": "# lex_dup1.py\n#\n# Duplicated rule specifiers\n\nimport sys\nif \"..\" not in sys.path: sys.path.insert(0,\"..\")\n\nimport ply.le"
},
{
"path": "xonsh/ply/test/lex_dup2.py",
"chars": 333,
"preview": "# lex_dup2.py\n#\n# Duplicated rule specifiers\n\nimport sys\nif \"..\" not in sys.path: sys.path.insert(0,\"..\")\n\nimport ply.le"
},
{
"path": "xonsh/ply/test/lex_dup3.py",
"chars": 314,
"preview": "# lex_dup3.py\n#\n# Duplicated rule specifiers\n\nimport sys\nif \"..\" not in sys.path: sys.path.insert(0,\"..\")\n\nimport ply.le"
},
{
"path": "xonsh/ply/test/lex_empty.py",
"chars": 192,
"preview": "# lex_empty.py\n#\n# No rules defined\n\nimport sys\nif \"..\" not in sys.path: sys.path.insert(0,\"..\")\n\nimport ply.lex as lex\n"
}
]
// ... and 157 more files (download for full content)
About this extraction
This page contains the full source code of the donnemartin/gitsome GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 357 files (2.3 MB), approximately 630.4k tokens, and a symbol index with 3765 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.