init
This commit is contained in:
35
.zprezto/modules/directory/README.md
Normal file
35
.zprezto/modules/directory/README.md
Normal file
@@ -0,0 +1,35 @@
|
||||
Directory
|
||||
=========
|
||||
|
||||
Sets directory options and defines directory aliases.
|
||||
|
||||
Options
|
||||
-------
|
||||
|
||||
- `AUTO_CD` auto changes to a directory without typing `cd`.
|
||||
- `AUTO_PUSHD` pushes the old directory onto the stack on `cd`.
|
||||
- `PUSHD_IGNORE_DUPS` does not store duplicates in the stack.
|
||||
- `PUSHD_SILENT` does not print the directory stack after `pushd` or `popd`.
|
||||
- `PUSHD_TO_HOME` pushes to the home directory when no argument is given.
|
||||
- `CDABLE_VARS` changes directory to a path stored in a variable.
|
||||
- `AUTO_NAME_DIRS` auto adds variable-stored paths to `~` list.
|
||||
- `MULTIOS` writes to multiple descriptors.
|
||||
- `EXTENDED_GLOB` uses extended globbing syntax.
|
||||
- `CLOBBER` does not overwrite existing files with `>` and `>>`. Use `>!` and
|
||||
`>>!` to bypass.
|
||||
|
||||
Aliases
|
||||
-------
|
||||
|
||||
- `d` prints the contents of the directory stack.
|
||||
- `1 ... 9` changes the directory to the **n** previous one.
|
||||
|
||||
Authors
|
||||
-------
|
||||
|
||||
*The authors of this module should be contacted via the [issue tracker][1].*
|
||||
|
||||
- [James Cox](https://github.com/imajes)
|
||||
- [Sorin Ionescu](https://github.com/sorin-ionescu)
|
||||
|
||||
[1]: https://github.com/sorin-ionescu/prezto/issues
|
30
.zprezto/modules/directory/init.zsh
Normal file
30
.zprezto/modules/directory/init.zsh
Normal file
@@ -0,0 +1,30 @@
|
||||
#
|
||||
# Sets directory options and defines directory aliases.
|
||||
#
|
||||
# Authors:
|
||||
# James Cox <james@imaj.es>
|
||||
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||
#
|
||||
|
||||
#
|
||||
# Options
|
||||
#
|
||||
|
||||
setopt AUTO_CD # Auto changes to a directory without typing cd.
|
||||
setopt AUTO_PUSHD # Push the old directory onto the stack on cd.
|
||||
setopt PUSHD_IGNORE_DUPS # Do not store duplicates in the stack.
|
||||
setopt PUSHD_SILENT # Do not print the directory stack after pushd or popd.
|
||||
setopt PUSHD_TO_HOME # Push to home directory when no argument is given.
|
||||
setopt CDABLE_VARS # Change directory to a path stored in a variable.
|
||||
setopt AUTO_NAME_DIRS # Auto add variable-stored paths to ~ list.
|
||||
setopt MULTIOS # Write to multiple descriptors.
|
||||
setopt EXTENDED_GLOB # Use extended globbing syntax.
|
||||
unsetopt CLOBBER # Do not overwrite existing files with > and >>.
|
||||
# Use >! and >>! to bypass.
|
||||
|
||||
#
|
||||
# Aliases
|
||||
#
|
||||
|
||||
alias d='dirs -v'
|
||||
for index ({1..9}) alias "$index"="cd +${index}"; unset index
|
Reference in New Issue
Block a user