From c5a2b3c35ba9d53a6e2d97671acbd6293c9128b3 Mon Sep 17 00:00:00 2001 From: "Doncho N. Gunchev" Date: Tue, 13 Feb 2024 17:43:44 +0200 Subject: [PATCH] Add environment, time style and ls aliases. --- etc/profile.d/z-aliases.sh | 11 +++++++++++ etc/profile.d/z-env.sh | 10 ++++++++++ etc/profile.d/z-time_style.sh | 2 ++ 3 files changed, 23 insertions(+) create mode 100755 etc/profile.d/z-aliases.sh create mode 100755 etc/profile.d/z-env.sh create mode 100755 etc/profile.d/z-time_style.sh diff --git a/etc/profile.d/z-aliases.sh b/etc/profile.d/z-aliases.sh new file mode 100755 index 0000000..ac8c32e --- /dev/null +++ b/etc/profile.d/z-aliases.sh @@ -0,0 +1,11 @@ +# show hidden files and directories +alias l.='ls -d .[^.]* ..?* --color=tty 2>/dev/null' + +# long format with ISO dates +alias lll='ls -Al "--time-style=+%Y-%m-%d %H:%M:%S %4Z"' + +# color less (restricted) +alias less='less -R' + +# color ip route +alias ip='ip --color=auto' diff --git a/etc/profile.d/z-env.sh b/etc/profile.d/z-env.sh new file mode 100755 index 0000000..fe82f50 --- /dev/null +++ b/etc/profile.d/z-env.sh @@ -0,0 +1,10 @@ +EDITOR=mcedit +export EDITOR + +HISTSIZE=20480 +export HISTSIZE + +if [ -x /usr/bin/fzf ]; then + FZF_DEFAULT_OPTS="--history-size=$HISTSIZE" + export FZF_DEFAULT_OPTS +fi diff --git a/etc/profile.d/z-time_style.sh b/etc/profile.d/z-time_style.sh new file mode 100755 index 0000000..1412474 --- /dev/null +++ b/etc/profile.d/z-time_style.sh @@ -0,0 +1,2 @@ +TIME_STYLE=long-iso +export TIME_STYLE