Autoload the function instead of declaring it directly. Add functionality for multiple targets. It should now pretty much perform like `command ls`. Refactored code to use more zsh extensions like globbing instead of parsing the output of `ls` making it a lot faster.
21 lines
413 B
Bash
21 lines
413 B
Bash
## Author: druckdev
|
|
## Created: 2019-10-27 (originally 2019-08-28 as functions.zsh)
|
|
|
|
## List items in trash if no argument is specified
|
|
function _trash_list_default() {
|
|
if [ $# -eq 0 ]; then
|
|
command trash-list
|
|
else
|
|
command trash "$@"
|
|
fi
|
|
}
|
|
|
|
## Open nemo in current directory if no argument is specified
|
|
function _nemo_wd_default() {
|
|
if [ $# -eq 0 ]; then
|
|
command nemo ./
|
|
else
|
|
command nemo "$@"
|
|
fi
|
|
}
|