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