# So we need something else. Command lines and env variables sent across ssh are strictly limited.
# We could override an obscure unused LC_var, like telephone, or we could transfer a file.
# But I choose to set SendEnv and AcceptEnv ssh vars for BASH_LOGIN_SHELL.
+# In a private file, i have aliases for if $- == *i*, ssh -t, else ssh.
[[ $- != *i* && ! $SSH_CONNECTION ]] && export BASH_LOGIN_SHELL=true
+
if [[ $SSH_CONNECTION ]] \
&& [[ $- == *c* ]] \
&& [[ ! $SSH_TTY ]] \
fi
}
pf() {
+ # scratch a very annoying itch.
+ # package description width as wide as the screen, and package name field small
+ # aptitude manual can't figure out how wide emacs terminal is,
+ # of course it doesn't consult the $COLUMNS variable...
+ # and in a normal terminal, it makes the package name field ridiculously big
+ # also, remove that useless dash before the description
if [[ $EUID == 0 ]]; then
- aptitude search "$@"
+ aptitude -F "%c%a%M %p %$((COLUMNS - 30))d" -w $COLUMNS search "$@"
else
- sudo aptitude search "$@"
+ sudo aptitude -F "%c%a%M %p %$((COLUMNS - 30))d" -w $COLUMNS search "$@"
fi
}
fi