GithubHelp home page GithubHelp logo

fish-dict's Introduction

halostatue/fish-dict

Version

Dictionary functions for fish shell. These functions are based on bash 3 functionality, because fish does not yet support associative arrays.

This has been extracted from halostatue/fish-utils-core because these functions are not core and should be installed on their own.

Note that these functions should only be used when there is no other alternative available, and there's usually an alternative.

Installation

Install with Fisher (recommended):

fisher install halostatue/[email protected]
Not using a package manager?

Copy functions/*.fish to your fish configuration directory preserving the directory structure.

System Requirements

Functions

dict:* - dict:empty, dict:get, dict:has_key, dict:keys, dict:set

Functions to give fish behaviour similar to associative arrays found in zsh or bash 4. This is based on functions that I wrote for bash 3 and uses the same technique.

dict:set x y          # sets x{y} to an empty value
dict:set x y 1        # sets x{y} to the value 1
dict:set x y 1 2 3    # sets x{y} to the list value 1 2 3
dict:get x y          # gets the value of x{y}
dict:has_key x y      # true if key y exists in dictionary x
dict:empty x          # true if there is no dictionary x
dict:keys x           # the list of all keys in dictionary x
dict:count x          # the number of keys found in dictionary x

Licence

MIT

Change Log

CHANGELOG

Contributing

fish-dict's People

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

a1ip

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.