Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/desyncr/auto-ls
zsh plugin for auto-ls
https://github.com/desyncr/auto-ls
plugin prompt zsh
Last synced: 10 days ago
JSON representation
zsh plugin for auto-ls
- Host: GitHub
- URL: https://github.com/desyncr/auto-ls
- Owner: desyncr
- License: gpl-3.0
- Created: 2017-05-03T05:18:47.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-04-30T18:26:12.000Z (6 months ago)
- Last Synced: 2024-10-13T01:01:51.652Z (24 days ago)
- Topics: plugin, prompt, zsh
- Language: Shell
- Homepage:
- Size: 34.2 KB
- Stars: 89
- Watchers: 2
- Forks: 27
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Auto-ls
There are many `auto-ls`s out there but this one is mine.
# Features
- Custom command on `cwd`/`enter-key`
- Auto `ls` on `cwd`
- Auto `ls` on `enter-key` (with empty buffer)
- Git status on a git work tree# Install
- Manual
curl -L https://git.io/auto-ls > /path/to/auto-ls.zsh
source /path/to/auto-ls.zsh- [Antigen](https://github.com/zsh-users/antigen)
antigen bundle desyncr/auto-ls
- [zplugin](https://github.com/zdharma/zplugin)
zplugin ice wait'0' lucid
zplugin load desyncr/auto-ls# Configuration
- `AUTO_LS_COMMANDS`: Use this configuration option to define the functions to run on cwd/enter-key.
Example: `AUTO_LS_COMMANDS=(ls git-status)`
- `AUTO_LS_NEWLINE`: Configure `ls` to put a newline (Default: true).
Example: `AUTO_LS_NEWLINE=false`
- `AUTO_LS_PATH`: Detect command full path to execute (Default: true).
Example: `AUTO_LS_PATH=false`
- `AUTO_LS_CHPWD`: Enable/disable auto-ls on directory change (Default: true)
Example: `AUTO_LS_CHPWD=false`
# Customization
You can configure commands in order to execute on `cwd`/`ls`, example:
```
AUTO_LS_COMMANDS=(ls git-status '/usr/bin/git log')
# Or...
AUTO_LS_COMMANDS=(ls git-status '[[ -d $PWD/.git ]] && /usr/bin/git log|head')```
You may redefine default functions or define custom functions to be run on cwd/enter-key:
- Before loading auto-ls define a function to be executed:
auto-ls-custom_function () {
echo "Current directory list:"
ls -ltra
}* Be sure to call it `auto-ls-`\.
- Configure auto-ls to load your function. Put the following line before sourcing auto-ls:
AUTO_LS_COMMANDS=(custom_function)
* Only use \ rather than `auto-ls-`\.
You may as well load the default functions, `ls` and `git-status`:
AUTO_LS_COMMANDS=(ls git-status custom_function)
# Future
- `zstyle` options to customize ls options
- `zstyle` options to customize git status