Skip to content

Commit

Permalink
emulate aliased ls for zsh completion. produce #42
Browse files Browse the repository at this point in the history
  • Loading branch information
h-youhei committed Feb 27, 2018
1 parent 48ff7d3 commit 2254562
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
7 changes: 7 additions & 0 deletions sh-common/profile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ export MANPAGER='manpager'
export LESS='-i -M -R --shift 5'
export LESSHISTFILE=$TMPDIR/less_history-$UID

#export LS_COLORS via dircolors
if [ -e $HOME/.dircolors ] ; then
eval `dircolors $HOME/.dircolors`
else
eval `dircolors /etc/DIR_COLORS`
fi

export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket"

# [ -z $DISPLAY ] prevents to duplicate xserver
Expand Down
8 changes: 6 additions & 2 deletions zsh/zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,16 @@ LISTMAX=0
setopt auto_remove_slash
# show list with compact
setopt list_packed
# similar ls -F
setopt list_types
# smartcase
#zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
setopt automenu

# emulate "ls -F --color=auto --group-directory-first"
setopt list_types
#TODO: this doesn't work, what's wrong?
#zstyle ':completion:*' list-dirs-first true
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}


# command history
#--------------------
Expand Down

0 comments on commit 2254562

Please sign in to comment.