You are not logged in.
Hello, guys! Do you know whether it is possible to do the following:
+ Hide "cd %something%" message when changing current working directory with typing just its name (without "cd") with "shopt -s autocd" enabled
+ Colorify the output of tab-completion (ordinary colored ls behaviour)
?
Last edited by eruditorum (2013-02-16 11:10:48)
Offline
Why not just using zsh? is pretty similar with bash anyway
"open source is about choice"
No.
Open source is about opening the source code complying with this conditions, period. The ability to choose among several packages is just a nice side effect.
Offline
Zshell is really difficult to set up.
Last edited by eruditorum (2013-01-20 07:24:46)
Offline
Exit code in the prompt is easy, just put $? in your PS1.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Not difficult... Try grml-zsh-config in [extra].
Offline
Zshell is really difficult to set up.
It works fine out of the box: it even has an interactive wizard-type thing to set up a basic config for you. And there is excellent documentation available.
Offline
Exit code in the prompt is easy, just put $? in your PS1.
Already figured that out, thanks. But I've found some problem...
Last edited by eruditorum (2013-01-20 07:25:28)
Offline
You can use trap to make your own handler for command not found errors that runs your own cd function if the unknown command is a directory.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
About displaying last exit code in promt: how do I display it only once and then remove it if no more program was started after that (just hit enter with empty input many times)?
I mean this:
EXIT () {
case "$?" in
0) echo "";; *) echo -e "\e[1;35m$?\e[m ";;
esac
}PS1='$(EXIT)\[\e[1;34m\]$PWD \[\e[1;32m\]#\[\e[m\] 'It won't update my prompt until some other program is executed
(. Is that possible on z-shell?
Last edited by eruditorum (2013-01-20 07:26:31)
Offline
Is that possible on z-shell?
Yes.
%(0?..%?)Offline
Okay. This works as I wanted:
EC () {
echo -e '\e[1;35m'$?'\n'
}
trap EC ERROffline