Creating template/FILES.template so that baash_it users can get started more quickly with `$ edit `

Plus small bug in edit
pull/232/head
Jean-Michel Fayard 2013-10-21 23:50:16 +02:00
parent 0fd2277762
commit 907f7ceaa9
3 changed files with 37 additions and 1 deletions

View File

@ -9,6 +9,10 @@ cp $HOME/.bash_it/template/bash_profile.template.bash $HOME/.bash_profile
echo "Copied the template .bash_profile into ~/.bash_profile, edit this file to customize bash-it"
# TODO: this should be tested more.
cp $BASH_IT/template/FILES.template $BASH_IT/custom/FILES
echo "Copied the template FILES into $BASH_IT/custom/FILES, edit this file to have bookmarks to file you 'edit' often"
while true
do
read -p "Do you use Jekyll? (If you don't know what Jekyll is, answer 'n') [Y/N] " RESP

View File

@ -357,7 +357,7 @@ edit () {
FILES=$1
if [ -z "$FILES" ]
then
$EDITOR $HOME/.bash-it/custom/FILES
$EDITOR $BASH_IT/custom/FILES
else
$EDITOR $FILES
fi

View File

@ -0,0 +1,32 @@
# This file is opened with you type 'edit' without argument
# $ edit
# Simply edit this file and put you have bookmarks to the files you edit most
#
# You don't need anymore to go to the same directory and open the same files again and again
# How to open the file is then trivial
# - With vim, see :help gf
# - With xxx, do yyyy
# - If your text editor doesn't have that feature, simply copy and paste
# When you call edit with arguments, edit is simply a shortcut to EDITOR
# $ edit /etc/fstab
# edit those files as root
/etc/apt/sources.list
/etc/fstab
/etc/hosts
/etc/hosts
/etc/nginx/conf.d/nginx.conf
/etc/profile
# edit those files as a user
$BASH_IT/aliases/custom.aliases.bash
$BASH_IT/lib/custom.bash
$BASH_IT/plugins/custom.plugins.bash
$HOME/.bash_profile
$HOME/.vimrc
$HOME/.emacs
# See here for inspiration of what you can put here
http://en.wikibooks.org/wiki/Guide_to_Unix/Files