zsh: tweak ls aliases
This commit is contained in:
@@ -145,12 +145,6 @@ in
|
||||
"ecit" = "exit";
|
||||
"exi5" = "exit";
|
||||
"exiy" = "exit";
|
||||
# ls helpers (eza is a nicer `ls`
|
||||
"l" = "eza --time-style=long-iso --oneline"; # show one entry per line
|
||||
"ll" = "eza --time-style=long-iso --long"; # like ls -l
|
||||
"lla" = "eza --time-style=long-iso --long --all"; # like ls -al
|
||||
"la" = "eza --time-style=long-iso --oneline --all"; #like ls -a
|
||||
"lal" = "eza --time-style=long-iso --long --all"; # like ls -al
|
||||
# overcome poor defaults
|
||||
"lsof" = "lsof -P"; #< lsof: use port *numbers*, not names
|
||||
"quit" = "exit";
|
||||
@@ -186,12 +180,12 @@ in
|
||||
|
||||
HISTORY_IGNORE='(sane-shutdown *|sane-reboot *|rm *|nixos-rebuild.* switch|switch)'
|
||||
|
||||
# extra aliases
|
||||
# TODO: move to `shellAliases` config?
|
||||
# user-facing helpers.
|
||||
# could be aliases, but then they wouldn't be able to call into eachother.
|
||||
function c() {
|
||||
# list a dir after entering it
|
||||
cd "$@"
|
||||
eza --oneline
|
||||
ll
|
||||
}
|
||||
function deref() {
|
||||
# convert a symlink into a plain file of the same content
|
||||
@@ -201,6 +195,29 @@ in
|
||||
fi
|
||||
chmod u+w "$1"
|
||||
}
|
||||
|
||||
# ls helpers (eza is a nicer `ls`)
|
||||
# l: list directory, one entry per line
|
||||
function l() {
|
||||
eza --time-style=long-iso --bytes --oneline "$@"
|
||||
}
|
||||
# l: like `ls -l`
|
||||
function ll() {
|
||||
eza --time-style=long-iso --bytes --long "$@"
|
||||
}
|
||||
# lla: like `ls -al`
|
||||
function lla() {
|
||||
eza --time-style=long-iso --bytes --long --all "$@"
|
||||
}
|
||||
# la: like `ls -a`
|
||||
function la() {
|
||||
eza --time-style=long-iso --bytes --oneline --all "$@"
|
||||
}
|
||||
# lal: like `ls -al`
|
||||
function lal() {
|
||||
eza --time-style=long-iso --bytes --long --all "$@"
|
||||
}
|
||||
|
||||
function nd() {
|
||||
# enter a directory, creating it if necessary
|
||||
mkdir -p "$1"
|
||||
|
Reference in New Issue
Block a user