NAME

orgsh - Navigate and manipulate in-memory Org document tree using a CLI shell

VERSION

version 0.001

SYNOPSIS

% orgsh --help
% orgsh [opts]

orgsh> _

Load an Org document:

orgsh> loadorg --as animals --source /home/budi/animals.org
orgsh> loadorg animals /home/budi/animals.org

Load another Org document:

orgsh> loadorg plants ~/plants.org

See loaded objects:

orgsh> objects
+-----------+---------------------------+-----+
| name      | source                    | cwd |
+-----------+---------------------------+-----+
| animals   | /home/budi/animals.json   | /   |
| plants    | /home/budi/plants.org     | /   |
+-----------+---------------------------+-----+

Dump a loaded object:

orgsh> dumpobj animals
...

Browse top-level children of a tree object:

orgsh> setcurobj plants
orgsh> ls -l
...

or:

orgsh> ls -l --obj plants
...

Change "directory" to view another part of the tree (from hereon, please remember that you can set the object you want to work with with setcurobj command first, or specify the name of the object using --object option):

orgsh> cd /dog
orgsh> ls -l

Removing nodes of a tree object:

orgsh> rm poo*

[NOT YET IMPLEMENTED] Reload an object from file (reverting all modifications):

orgsh> reloadobj animals

[NOT YET IMPLEMENTED] Save a loaded object to file:

orgsh> saveobj animals

[NOT YET IMPLEMENTED] Save a loaded object to another file:

orgsh> saveobj animals /home/budi/animals-new.org

DESCRIPTION

This utility lets you navigate and manipulate in-memory Org tree objects. You can then browse the tree as if it were a filesystem, using command like cd and ls. You can prune nodes, add/modify nodes, as well as move/copy nodes around. You can save the changes back to file.

OPTIONS

  • --help-, -h, -?

    Show short help message and exit.

  • --version, -v

    Show version and exit.

COMMANDS

For now, use help command, or command --help.

SETTINGS

Settings are configuration and regulate how the shell behaves.

output_format => str (default: text)

Set output format for command results. The same formatting is used by Perinci::CmdLine. See that module or Perinci::Result::Format for more details.

debug_completion => bool (default: 0)

Whether to show debugging information when doing tab completion.

debug_time_command => bool (default: 0)

Whether to show how long a command takes.

FAQ

The prompt looks rather garbled (e.g. extra " m >" character)!

It looks to be an issue with Term::ReadLine::Perl. Try installing Term::ReadLine::Gnu instead.

How do I redirect output of command to files?

orgsh is meant to be a simple shell, not a full-blown Unix shell. So this feature is currently not implemented.

What about variables, aliases, looping, or $other_Unix_shell_feature?

Again, orgsh is meant to be a simple shell, not a full-blown Unix shell. So those features are currently not implemented.

ENVIRONMENT

ORGSH_HISTFILE => str (default: ~/.orgsh_history)

Specify location of command history file. Like in shells, can be set to empty string to disable history loading/saving.

ORGSHRC => str (default: ~/.orgshrc)

Specify location of settings file.

FILES

~/.orgsh_history

Command history file.

~/.orgshrc

Settings file (IOD format).

AUTHOR

perlancar <perlancar@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2020 by perlancar@cpan.org.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.