Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/yggdr/xontrib-dotdot

Better aliases['..'] = 'cd ..'
https://github.com/yggdr/xontrib-dotdot

xonsh xontrib

Last synced: about 1 month ago
JSON representation

Better aliases['..'] = 'cd ..'

Awesome Lists containing this project

README

        


Better aliases['..'] = 'cd ..'

## Installation

To install use pip:

```xsh
xpip install xontrib-dotdot
# or: xpip install -U git+https://github.com/yggdr/xontrib-dotdot
```

## Usage

This xontrib will get loaded automatically for interactive sessions.
To stop this, set

```xsh
$XONTRIBS_AUTOLOAD_DISABLED = {"dotdot", }
```

Now going up in directories can be simply done by chaining dots:

```xsh
$ pwd
# /some/deep/nested/directory/structure/I/want/to/leave
$ .....
$ pwd
# /some/deep/nested/directory/structure/
```

The first two dots takes you to the parent, any further dot will go up one more.

Dots and commas can be freely mixed, the above example could've also been
achieved by typing `..,,.`. This behaviour can be changed by setting the
`$XONTRIB_DOTDOT_COMMA` environment variable to False

## Credits

This package was created with [xontrib template](https://github.com/xonsh/xontrib-template).