From de8ef8286a88f82976bb6d4c89de0757272c7bcc Mon Sep 17 00:00:00 2001 From: Nathan Robinson Date: Fri, 25 May 2018 23:46:18 -0400 Subject: Remove po alias https://github.com/robbyrussell/oh-my-zsh/issues/6761 --- lib/directories.zsh | 4 ---- 1 file changed, 4 deletions(-) (limited to 'lib/directories.zsh') diff --git a/lib/directories.zsh b/lib/directories.zsh index a50a692c8..14064b86f 100644 --- a/lib/directories.zsh +++ b/lib/directories.zsh @@ -28,7 +28,3 @@ alias lsa='ls -lah' alias l='ls -lah' alias ll='ls -lh' alias la='ls -lAh' - -# Push and pop directories on directory stack -alias pu='pushd' -alias po='popd' -- cgit v1.2.3-70-g09d2 From b0a149076fc39ff2707279c2246744378643c0d5 Mon Sep 17 00:00:00 2001 From: Ben Klein Date: Sat, 16 Jun 2018 20:35:41 -0400 Subject: Allow arguments to `d` to be passed to dirs Replace the alias with a function. Call `dirs` if arguments are given to `d`. --- lib/directories.zsh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'lib/directories.zsh') diff --git a/lib/directories.zsh b/lib/directories.zsh index 14064b86f..355c442d2 100644 --- a/lib/directories.zsh +++ b/lib/directories.zsh @@ -21,7 +21,14 @@ alias 9='cd -9' alias md='mkdir -p' alias rd=rmdir -alias d='dirs -v | head -10' +function d () { + if [[ -n $1 ]]; then + dirs "$@" + else + dirs -v | head -10 + fi +} +compdef _dirs d # List directory contents alias lsa='ls -lah' -- cgit v1.2.3-70-g09d2 From ea3e666e04bfae31b37ef42dfe54801484341e46 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Tue, 7 May 2019 21:29:10 +0200 Subject: init: run compinit before loading lib/ files --- lib/directories.zsh | 1 + oh-my-zsh.sh | 19 ++++++++++--------- 2 files changed, 11 insertions(+), 9 deletions(-) (limited to 'lib/directories.zsh') diff --git a/lib/directories.zsh b/lib/directories.zsh index 355c442d2..cf87bd7e4 100644 --- a/lib/directories.zsh +++ b/lib/directories.zsh @@ -21,6 +21,7 @@ alias 9='cd -9' alias md='mkdir -p' alias rd=rmdir + function d () { if [[ -n $1 ]]; then dirs "$@" diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh index b1460b1d7..6b2662d5e 100644 --- a/oh-my-zsh.sh +++ b/oh-my-zsh.sh @@ -29,15 +29,6 @@ if [[ -z "$ZSH_CUSTOM" ]]; then fi -# Load all of the config files in ~/oh-my-zsh that end in .zsh -# TIP: Add files you don't want in git to .gitignore -for config_file ($ZSH/lib/*.zsh); do - custom_config_file="${ZSH_CUSTOM}/lib/${config_file:t}" - [ -f "${custom_config_file}" ] && config_file=${custom_config_file} - source $config_file -done - - is_plugin() { local base_dir=$1 local name=$2 @@ -71,6 +62,7 @@ if [ -z "$ZSH_COMPDUMP" ]; then fi if [[ $ZSH_DISABLE_COMPFIX != true ]]; then + source $ZSH/lib/compfix.zsh # If completion insecurities exist, warn the user handle_completion_insecurities # Load only from secure directories @@ -80,6 +72,15 @@ else compinit -u -C -d "${ZSH_COMPDUMP}" fi + +# Load all of the config files in ~/oh-my-zsh that end in .zsh +# TIP: Add files you don't want in git to .gitignore +for config_file ($ZSH/lib/*.zsh); do + custom_config_file="${ZSH_CUSTOM}/lib/${config_file:t}" + [ -f "${custom_config_file}" ] && config_file=${custom_config_file} + source $config_file +done + # Load all of the plugins that were defined in ~/.zshrc for plugin ($plugins); do if [ -f $ZSH_CUSTOM/plugins/$plugin/$plugin.plugin.zsh ]; then -- cgit v1.2.3-70-g09d2