Giter Club home page Giter Club logo

oh-my-xonsh's Introduction

oh-my-xonsh

-----------------------------------------------------

CALL FOR NEW MAINTAINERS

I started this project to bring features of OMZ to the Xonsh community, but no longer use Xonsh, and thus will not be maintaining this project. If you have a proven track record of helpful participation in the Xonsh community and believe this is project you would like to maintain into the future, please open an issue and I can transfer the org.

-----------------------------------------------------

๐Ÿ ๐Ÿš ๐Ÿ”Œ - A delightful framework to give your Python-powered, cross-platform, Unix-gazing Xonsh shell a boost!

Usage

Add the following snippet to your ~/.config/xonsh/rc.xsh or ~/.xonshrc:

# set where oh-my-xonsh lives
if not 'OMX_HOME' in ${...}:
    $OMX_HOME = p"~/.config/xonsh/oh-my-xonsh"

# clone omx if needed
if not pf"{$OMX_HOME}".exists():
    git clone --depth=1 https://github.com/oh-my-xonsh/oh-my-xonsh $OMX_HOME

# source oh-my-xonsh to give you the `omx` object
source $OMX_HOME/oh-my-xonsh.xsh

# choose your plugins
omx.plugins = [
    'autocmd',
    'brew',
    'clipboard',
    'common_aliases',
    'copydir',
    'dash',
    'git',
    'gitignore',
    'golang',
    'iwd',
    'macos',
    'manpage_coloring',
    'shrink_path',
    'up',
]

# configure your plugins
# omx.config["plugins.git.skip_aliases"] = True

# initialize oh-my-xonsh
omx.init()

Configuration

Some plugins allow for configuration options. The omx object has a .config property that allows you to set config values.

You need to be sure you set these values before calling omx.init() in your rc.xsh file.

For example:

# set your config options
omx.config["plugins.example.whoami"] = "I'm Batman!"
omx.config["plugins.git.skip_aliases"] = True

# now call init
omx.init()

Adding your own custom plugins

You can add your own custom .xsh files or plugins to OMX by using the $OMX_CUSTOM_HOME directory. You can set $OMX_CUSTOM_HOME to whatever you want, or you can use the OMX default. An example is included to help you get started.

The omx object

Sourcing Oh-My-Xonsh gives you the omx object, which allows you to do lots of great things, such as:

List available plugins

$ omx.list_plugins()
--- OMX plugins ---
autocmd
brew
cdls
clipboard
common_aliases
copydir
copyfile
dash
git
gitignore
golang
iwd
jupyter
macos
manpage_coloring
shrink_path
up
--- OMX custom plugins ---
example

Loaded plugins

You can see the CommandPipeline details about the plugins you've loaded, including the load times for each plugin.

$ omx.loaded_plugins

Updating OMX

OMX can update itself if you want as well (which is simply doing a git pull).

$ omx.update()

References

Oh-My-Xonsh is inspired by many wonderful similar projects from other shells:

oh-my-xonsh's People

Contributors

das-g avatar mattmc3 avatar slocke716 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

oh-my-xonsh's Issues

detect_clipboard failing

Hello!

I just wanted to try out this repositry and after installing I get:

detect_clipboard: Platform 'linux' not yet supported or clipboard utilities not found.

I have xclip and xsel but I still get this error which I can't find any reference of anywhere. Anything I'm missing here

Thanks!

Initial k8s integration syntax errors

When adding the k8s integration I verified all of the aliases but not the integration with the plugin system unfortunately. This issue is to correct the syntax error

'command' being called before desired command?

I'm running Ubuntu and I seem to have issues with some plugins where the command is called prior to the desired terminal command.
Example here

In other words, various plugins do something like command ls -l instead of just ls -l

I don't have a command binary. Is there something xon.sh related that I should be installing? Is command just a Mac thing?
Any input would be helpful. If it's just a mac thing then I can make a PR to handle the Linux crowd.

edit:
For anybody else with the same issue. I just added an xsh file called command to a folder in my path with this

#!/usr/bin/env xonsh

@($ARGS[1:])

Split into xontribs?

Hi!
This is a cool repository, it's great to see all of these features replicated for xonsh.
As far as I can tell, the the oh-my-xonsh xontrib is really just a metapackage that implements its own loading mechanism, and bundles some useful xontribs. Would you be averse to dropping the plugin mechanism, and instead publishing each plugin as its own standalone xontrib. Where plugins depend upon one another we could leverage Python dependencies. oh-my-xonsh would become a metapackage that just requires all of these xontribs.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.