Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

👓 🐚 Make your xonsh RC file installable with awesome snippets of code.

NotificationsYou must be signed in to change notification settings

anki-code/xontrib-rc-awesome

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Awesome snippets of code for xonshrc in xonsh shell.

If you like the idea click ⭐ on the repo andtweet.

First of all

Learn about xonsh run control (RC) files in official docs -Run Control File. You should know about what RC files are used in interactive and non-interactive sessions.

Use cases

Create your own pip-installable RC based on the awesome xonsh RC

  1. Fork this repository

  2. Rename the repository toxontrib-rc-yourname

  3. Change the namein setup.py

  4. Change the name ofxontrib/rc_awesome.xsh toxontrib/rc_yourname.xsh

  5. Add xontribs you need to setup.py (the xontribs will be installed automatically duringpip install)

  6. Now you can just run anywhere:

    pipinstall-Ugit+https://github.com/yourname/xontrib-rc-yourname# Only for interactive mode:# (You can also create autoloadable xontrib using xontrib-template.)echo'xontrib load rc_yourname'>>~/.xonshrc# For interactive or non-interactive (https://xon.sh/xonshrc.html):# mkdir -p ~/.config/xonsh/rc.d/# echo 'xontrib load rc_yourname' > ~/.config/xonsh/rc.d/rc_yourname.xshxonsh

    Also you can avoid manual loading the xontrib in~/.xonshrc by creating autoloadable xontrib usingxontrib-template. Answer yes on the question about enabling autoloading.

  7. Increment version to update the package usingpip install -U git+https://github.com/yourname/xontrib-rc-yourname

  8. Take a look intoxonsh-awesome-cli-app if you want to create your own toolset.

Copy and paste

Just readrc_awesome and copy the snippets to your xonsh RC.

Or add awesome xonsh RC to the end of yourxonshrc:

curl -s https://raw.githubusercontent.com/anki-code/xontrib-rc-awesome/main/xontrib/rc_awesome.xsh >> ~/.xonshrc

Or install awesomexonsh RC as a package withautomatically installable xontribs:

pipinstall-Ugit+https://github.com/anki-code/xontrib-rc-awesomeecho'xontrib load rc_awesome'>>~/.xonshrcxonsh

Learn from xonsh RC gurus

See also

  • xonsh-cheatsheet - cheat sheet for xonsh shell with copy-pastable examples.
  • xontrib-template - Full-featured template for building extension (xontrib) for the xonsh shell.

[8]ページ先頭

©2009-2025 Movatter.jp