Skip to content

Commit

Permalink
shell: replace exa with ls and tree
Browse files Browse the repository at this point in the history
exa is unmaintained.

Ref: ogham/exa#1243
  • Loading branch information
oxalica committed Sep 6, 2023
1 parent 6e8b4e9 commit 6f4fe0d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 9 deletions.
21 changes: 14 additions & 7 deletions home/modules/shell/cmds.zsh
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
local DEFAULT_EXA_ARGS=(--classify --time-style=iso)
alias ls="exa"
alias l="exa $DEFAULT_EXA_ARGS"
alias la="exa $DEFAULT_EXA_ARGS -a"
alias ll="exa $DEFAULT_EXA_ARGS -l --binary"
alias lla="exa $DEFAULT_EXA_ARGS -l --binary -a"
local DEFAULT_LS_ARGS=(
--escape
--color=auto
--classify
--time-style=iso
--human-readable
--kibibytes
)
alias l="command ls $DEFAULT_LS_ARGS"
alias la="command ls $DEFAULT_LS_ARGS --almost-all"
alias ll="command ls $DEFAULT_LS_ARGS -l"
alias lla="command ls $DEFAULT_LS_ARGS -l --almost-all"

alias n="nix"
alias nb="nix build"
Expand All @@ -23,7 +29,8 @@ alias reset="tput reset"

# List tree.
lt() {
exa $DEFAULT_EXA_ARGS -T --color=always $@ | eval $PAGER
# `-C` for `color=always`.
tree -C $@ | eval $PAGER
}

# Clipboard input/output.
Expand Down
4 changes: 3 additions & 1 deletion home/modules/shell/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@
setopt hist_verify
setopt inc_append_history_time
export LS_COLORS='rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:'
LS_COLORS="$(dircolors --sh)"
LS_COLORS="''${''${LS_COLORS#*\'}%\'*}"
export LS_COLORS
TIMEFMT=$'%J %uU user %uS system %uE/%*E elapsed %PCPU (%Xavgtext+%Davgdata %Mmaxresident)k\n%Iinputs+%Ooutputs (%Fmajor+%Rminor)pagefaults %Wswaps'
source ${pkgs.git}/share/git/contrib/completion/git-prompt.sh
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/console-env.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
environment.systemPackages = with pkgs; [
cntr # Nix helpers.
procs gdu swapview smartmontools pciutils usbutils # System info.
curl git strace pv exa fd ripgrep lsof jq loop bc file rsync dnsutils # Utilities.
curl git strace pv tree fd ripgrep lsof jq loop bc file rsync dnsutils # Utilities.
e2fsprogs compsize # Filesystems.
gnupg age pwgen sops ssh-to-age # Crypto.
libarchive zstd # Compression.
Expand Down

0 comments on commit 6f4fe0d

Please sign in to comment.