e24230cbfb766320fa13fcda6c1adb60028288f4
- Author
- Fredrik Appelberg <fredrik.appelberg@gmail.com>
- Committer
- Fredrik Appelberg <fredrik.appelberg@gmail.com>
- Date
Message
Diff
This diff is truncated to protect this page.
1diff --git a/.gitignore b/.gitignore
2index 2e8db7341894fdf0940c0c37995e93e1b3b0d9fa..51a5ee6c396f012ae162d0d63006d4d8e765b92f 100644
3--- a/.gitignore
4+++ b/.gitignore
5@@ -4,5 +4,6 @@ projects.zsh
6 custom/*
7 !custom/example
8 !custom/example.zsh
9-cache
10 *.swp
11+!custom/example.zshcache
12+cache/
13diff --git a/plugins/mvn/mvn.plugin.zsh b/plugins/mvn/mvn.plugin.zsh
14new file mode 100644
15index 0000000000000000000000000000000000000000..e8af2f49d5d2f87daeae99b23d59fecdc7b44d26
16--- /dev/null
17+++ b/plugins/mvn/mvn.plugin.zsh
18@@ -0,0 +1,6 @@
19+function listMavenCompletions {
20+ reply=(
21diff --git a/plugins/screen/screen.plugin.zsh b/plugins/screen/screen.plugin.zsh
22new file mode 100644
23index 0000000000000000000000000000000000000000..98178e807cce8d2f9363c0dda5d53bbc8466456d
24--- /dev/null
25+++ b/plugins/screen/screen.plugin.zsh
26@@ -0,0 +1,54 @@
27+# if using GNU screen, let the zsh tell screen what the title and hardstatus
28+# of the tab window should be.
29+if [[ $TERM == "screen" ]]; then
30+ if [[ $_GET_PATH == '' ]]; then
31+ _GET_PATH='echo $PWD | sed "s/^\/Users\//~/;s/^\/home\//~/;s/^~$USER/~/"'
32+ fi
33+ if [[ $_GET_HOST == '' ]]; then
34+ _GET_HOST='echo $HOST | sed "s/\..*//"'
35+ fi
36+
37+ # use the current user as the prefix of the current tab title
38+ TAB_TITLE_PREFIX='"`'$_GET_HOST'`:`'$_GET_PATH' | sed "s:..*/::"`$PROMPT_CHAR"'
39+ # when at the shell prompt, show a truncated version of the current path (with
40+ # standard ~ replacement) as the rest of the title.
41+ TAB_TITLE_PROMPT='$SHELL:t'
42+ # when running a command, show the title of the command as the rest of the
43+ # title (truncate to drop the path to the command)
44+ TAB_TITLE_EXEC='$cmd[1]:t'
45+
46+ # use the current path (with standard ~ replacement) in square brackets as the
47+ # prefix of the tab window hardstatus.
48+ TAB_HARDSTATUS_PREFIX='"[`'$_GET_PATH'`] "'
49+ # when at the shell prompt, use the shell name (truncated to remove the path to
50+ # the shell) as the rest of the title
51+ TAB_HARDSTATUS_PROMPT='$SHELL:t'
52+ # when running a command, show the command name and arguments as the rest of
53+ # the title
54+ TAB_HARDSTATUS_EXEC='$cmd'
55+
56+ # tell GNU screen what the tab window title ($1) and the hardstatus($2) should be
57+ function screen_set()
58+ {
59+ # set the tab window title (%t) for screen
60+ print -nR $'\033k'$1$'\033'\\\
61+
62+ # set hardstatus of tab window (%h) for screen
63+ print -nR $'\033]0;'$2$'\a'
64+ }
65+ # called by zsh before executing a command
66+ function preexec()
67+ {
68+ local -a cmd; cmd=(${(z)1}) # the command string
69+ eval "tab_title=$TAB_TITLE_PREFIX:$TAB_TITLE_EXEC"
70+ eval "tab_hardstatus=$TAB_HARDSTATUS_PREFIX:$TAB_HARDSTATUS_EXEC"
71+ screen_set $tab_title $tab_hardstatus
72+ }
73+ # called by zsh before showing the prompt
74+ function precmd()
75+ {
76+ eval "tab_title=$TAB_TITLE_PREFIX:$TAB_TITLE_PROMPT"
77+ eval "tab_hardstatus=$TAB_HARDSTATUS_PREFIX:$TAB_HARDSTATUS_PROMPT"
78+ screen_set $tab_title $tab_hardstatus
79+ }
80+fi