Skip to content

Commit

Permalink
fix(alias): ls alias lx is an illegal option on MacOS/BSD
Browse files Browse the repository at this point in the history
The option `-X` lets MacOS (and probably also other BSD-ish OS) ls
complain about an illegal option:

```
ls -lhXB
ls: illegal option -- X
usage: ls [-ABCFGHLOPRSTUWabcdefghiklmnopqrstuwx1] [file ...]
```
  • Loading branch information
casaper committed Mar 21, 2020
1 parent f4ca9eb commit 018a6df
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/utility/init.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,9 @@ alias ll='ls -lh' # Lists human readable sizes.
alias lr='ll -R' # Lists human readable sizes, recursively.
alias la='ll -A' # Lists human readable sizes, hidden files.
alias lm='la | "$PAGER"' # Lists human readable sizes, hidden files through pager.
alias lx='ll -XB' # Lists sorted by extension (GNU only).
if [[ "$OSTYPE" != darwin* ]]; then
alias lx='ll -XB' # Lists sorted by extension (GNU only).
fi
alias lk='ll -Sr' # Lists sorted by size, largest last.
alias lt='ll -tr' # Lists sorted by date, most recent last.
alias lc='lt -c' # Lists sorted by date, most recent last, shows change time.
Expand Down

0 comments on commit 018a6df

Please sign in to comment.