ZSH: Move env' and
line' to separate files
This commit is contained in:
parent
76258665e7
commit
7c4e930ba4
3 changed files with 15 additions and 16 deletions
3
.zsh/functions/env
Normal file
3
.zsh/functions/env
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
# -*- mode: shell-script -*-
|
||||||
|
|
||||||
|
/usr/bin/env "$@" | grep -v ^LESS_TERMCAP_
|
9
.zsh/functions/line
Normal file
9
.zsh/functions/line
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
# -*- mode: shell-script -*-
|
||||||
|
|
||||||
|
let width=$(expr $COLUMNS - ${#1} - 2)
|
||||||
|
|
||||||
|
for i in {1..$width}; do
|
||||||
|
echo -n \\x2d
|
||||||
|
done
|
||||||
|
|
||||||
|
echo -n " $1"
|
19
.zshrc
19
.zshrc
|
@ -1,6 +1,9 @@
|
||||||
# -*- Mode: shell-script -*-
|
# -*- Mode: shell-script -*-
|
||||||
# Setup variables
|
# Setup variables
|
||||||
PATH="${HOME}/bin:${PATH}:/usr/local/bin"
|
PATH="${HOME}/bin:${PATH}:/usr/local/bin"
|
||||||
|
INFOPATH="${HOME}/documents/info:${INFOPATH}"
|
||||||
|
|
||||||
|
export INFOPATH
|
||||||
|
|
||||||
HISTFILE=~/.zsh/histfile
|
HISTFILE=~/.zsh/histfile
|
||||||
HISTSIZE=1000
|
HISTSIZE=1000
|
||||||
|
@ -16,22 +19,6 @@ zstyle :compinstall filename '/home/slash/.zshrc'
|
||||||
autoload -Uz compinit
|
autoload -Uz compinit
|
||||||
compinit
|
compinit
|
||||||
|
|
||||||
# Functions
|
|
||||||
function env()
|
|
||||||
{
|
|
||||||
exec /usr/bin/env "$@" | grep -v ^LESS_TERMCAP_
|
|
||||||
}
|
|
||||||
|
|
||||||
function line()
|
|
||||||
{
|
|
||||||
let width=`expr $COLUMNS - ${#1} - 2`
|
|
||||||
for i in {1..$width}
|
|
||||||
do
|
|
||||||
echo -n \\x2d
|
|
||||||
done
|
|
||||||
echo " $1"
|
|
||||||
}
|
|
||||||
|
|
||||||
function shutdown()
|
function shutdown()
|
||||||
{
|
{
|
||||||
dbus-send --system --print-reply \
|
dbus-send --system --print-reply \
|
||||||
|
|
Loading…
Reference in a new issue