Skip to content

Navigation Menu

Sign in
Appearance settings

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
Appearance settings

Adding very simple usage examples may be practical #2

Open
@nicolashainaux

Description

Hello,

Nice and helpful project!

I wanted to test this on my firefox profile, but had to struggle just a little bit until I found out how to use it:

nico@xantico:~$ source .local/bin/bash-ini-parser.sh 
nico@xantico:~$ cd .mozilla/firefox
nico@xantico:~/.mozilla/firefox$ ini_file_read profiles.ini 
nico@xantico:~/.mozilla/firefox$ cat profiles.ini 
[Install46F492E0ACFF84D4]
Default=s25g8abr.dev-edition-default
Locked=1
[Install4F96D1932A9F858E]
Default=waxl9k8u.default
Locked=1
[Profile1]
Name=default-release
IsRelative=1
Path=v6gmyi1u.default-release
[Profile0]
Name=default
IsRelative=1
Path=waxl9k8u.default
Default=1
[General]
StartWithLastProfile=1
Version=2
nico@xantico:~/.mozilla/firefox$ ini_section_list profiles.ini 
nico@xantico:~/.mozilla/firefox$ ini_file_read 
nico@xantico:~/.mozilla/firefox$ ini_file_read --help
nico@xantico:~/.mozilla/firefox$ ini_file_read `cat profiles.ini`
nico@xantico:~/.mozilla/firefox$ cat profiles.ini | ini_file_read 
nico@xantico:~/.mozilla/firefox$ ini_file_read "k1=val1"
[Default]k1=val1
nico@xantico:~/.mozilla/firefox$ ini_file_read "`cat profiles.ini`"
[Install46F492E0ACFF84D4]Default=s25g8abr.dev-edition-default
[Install46F492E0ACFF84D4]Locked=1
[Install4F96D1932A9F858E]Default=waxl9k8u.default
[Install4F96D1932A9F858E]Locked=1
[Profile1]Name=default-release
[Profile1]IsRelative=1
[Profile1]Path=v6gmyi1u.default-release
[Profile0]Name=default
[Profile0]IsRelative=1
[Profile0]Path=waxl9k8u.default
[Profile0]Default=1
[General]StartWithLastProfile=1
[General]Version=2
nico@xantico:~/.mozilla/firefox$

(Finally found out reading the tests). Maybe something like a simple

ini_file_read "`cat myfile.ini`"

(or whatever is better) somewhere in the README or from a --help option, might be nice.

Thank you anyway, this was much shorter than re-creating it entirely myself :-)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /