Преглед на файлове

Adding function to clear+print+run a command
Removing FDS-specific values from profile-p4

Sam Jaffe преди 8 години
родител
ревизия
bcaf03490f
променени са 2 файла, в които са добавени 12 реда и са изтрити 4 реда
  1. 6 4
      profile-p4
  2. 6 0
      profile-util

+ 6 - 4
profile-p4

@@ -1,6 +1,8 @@
-export P4EDITOR=/home/user/wreed/bin/vim
-export P4DIFF="/home/user/wreed/bin/vim -d"
-export P4MERGE="/home/user/wreed/bin/vim -d"
+export P4EDITOR="${EDITOR}"
+export P4DIFF="${EDITOR} -d"
+export P4MERGE="${EDITOR} -d"
+: ${P4_MAIN_ROOT:="//depot/"}
+export P4_MAIN_ROOT
 
 alias p4a="p4 add"
 alias p4e="p4 edit"
@@ -16,7 +18,7 @@ alias p4reset="p4 diff -sr | p4 -x - revert"
 p4whose() {
   if [[ $# -ne 1 ]]; then return 1; fi
   local file="${1}"
-  if [[ ${file:0:2} != "//" ]]; then local file="//depot/online/makefds/mainline/${file}"; fi
+  if [[ ${file:0:2} != "//" ]]; then local file="${P4_MAIN_ROOT}${file}"; fi
   # Get only lines with a change source (no integrate/branch)
   # Pull the name of each submitter
   # Uniqueify without losing order

+ 6 - 0
profile-util

@@ -114,5 +114,11 @@ swap() {
 
 alias coms="${HOME}/tools/comstore/commands.sh"
 
+clrun() {
+  clear
+  echo "$@"
+  "$@"
+}
+
 source ${HOME}/.profile-p4