GithubHelp home page GithubHelp logo

plugin-grc's Introduction


plugin-grc

A grc plugin plugin for Oh My Fish.

Note: You need to have grc installed

screenshot

Install

$ omf install grc

Built-in command colorizers

Everyone supported by the original grc tool. If there are tools that are missing add them to the executables file and make a pull-request for it

Among others, it includes the following:

  • cat
  • cvs
  • df
  • diff
  • dig
  • gcc
  • g++
  • ifconfig
  • ls
  • make
  • mount
  • mtr
  • netstat
  • ping
  • ps
  • tail
  • traceroute
  • wdiff

Plugin options

It's possible to define additional command options via universal grcplugin variables. For example:

set -U grcplugin_ls --color -l

Makes grc call ls with --color and -l options.

Override command colorizers

It's possible to override the commands that are colorized via grc_plugin_execs variable. For example:

set -U grc_plugin_execs gcc g++ make

Enables grc colorizing for only gcc, g++ & make and disables all others.

Ignore specific executables

Alternatively, you can specify commands that the plugin should not override. You can do that via the grc_plugin_ignore_execs variable:

set -U grc_plugin_ignore_execs ls

Specify custom executables

If you have custom executables that should be wrapped with grc specify them in grc_plugin_extras:

set -U grc_plugin_extras my_custom_executable

License

MIT © oh-my-fish et al

plugin-grc's People

Contributors

bergercookie avatar bobthecow avatar bpinto avatar derekstavis avatar domoritz avatar gustafj avatar nikoskoukis-slamcore avatar tannhuber 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

plugin-grc's Issues

Update for newer oh-my-fish

I had to rename grc.load to grc.fish for it to work. This also should be submitted to oh-my-fish to be included in the database.

grc and ls

When I have the grc plugin installed and I issue a 'ls' no functions other than the one provided by the plugin:

function ls
set -l executable ls
grc.wrap $executable $argv
end

my output is a single column with no colors for indicating that it is a file or a directory. Would like to have grc installed and still have the files colored properly and have the choice of either doing columns or not.

grc broken on new omf version

image

I have upgraded my omf/fish to the latest version and started getting this error.

function: function name does not shadow a builtin so you must not use '--shadow-builtin'
~/.local/share/omf/pkg/grc/init.fish (line 12):       function $executable --shadow-builtin --inherit-variable executable --wraps=$executable
        grc.wrap $executable $argv
                                                      ^
from sourcing file ~/.local/share/omf/pkg/grc/init.fish
    called during startup

Following the error instruction does not fix it.

Versions:
fish, version 2.3.1
Oh My Fish! 2

Command not found ulimit

Hi, as the title describes, I cannot use ulimit if the grc fish plugin is active. I am on NixOS unstable and I installed the plugin with nixpkgs. The version available there is 61de7a8. This is what happens:

⌊φ ∈ nixos⌉ ulimit
grc: ulimit: No such file or directory
⌊φ ∈ nixos⌉ type ulimit
ulimit is a function with definition
# Defined in /nix/store/v648lfxchvm6hczyjzj2k84znxk85bdn-source/conf.d/grc.fish @ line 30
function ulimit
    set -l executable ulimit
        grc.wrap $executable $argv

end

System details:
Fish 3.7.0
NixOS unstable latest
Generic Colouriser 1.13

please document how to install

~ λ omf install grc
Trying to clone from URL...
fatal: repository 'grc' does not exist
Could not install package grc.

Grc syntax

Hi there, just installed this nice plugin and get this

Usage: grc [options]

grc: error: no such option: -e

GRC is installed from pip, OS is fedora

grc breaks ls on OS X Yosemite

grc breaks ls on OS X Yosemite. This is the output of ls command(function) in fish 2.1.2:

>>fish --ver
fish, version 2.1.2

>>ls
ls: illegal option -- -
usage: ls [-ABCFGHLOPRSTUWabcdefghiklmnopqrstuwx1] [file ...]

>>type ls
ls is a function with definition
function ls
    __execute_as_grc ls $argv;
end

Run grc with all commands

Does it make sense to run grc no matter whether the command is supported by grc or not? It would fix #2. If it's not supported, grc will ignore it.

ls breaks on mac OS X

set -U grcplugin_ls --color -l

causes


ls                                                                  22:54:13
ls: illegal option -- -
usage: ls [-ABCFGHLOPRSTUWabcdefghiklmnopqrstuwx1] [file ...]

grc plugin does not work with path names

For example,

./configure

doesn't produce colorized output. However, it's possible to use

grc ./configure

instead. The problem is that the plugin redefines commands by functions. If anybody knows how to implement it in a better way, please tell me!

Default config brake systemctl edit

with default plugin config I cannot edit user systemd services

➜ systemctl --user edit mailsync
Cannot edit units if not on a tty.

removing systemctl from conf.d/executables fix this for me.

Is it possible to ignore coloring when issuing edit?

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.