Presented to attendees of RailsGirls Sydney Nov 2013.
The command line. Developers' attitudes and common usage. How to improve your experience with it, from a beginner's perspective.
4. What do programmers
use it for?
In order of most frequent to least frequent:
git
git
git
git
git
git
git
git
git
git
git
status
grep
diff
add
log
checkout
commit
push
pull
show
rebase
10. Basics
cd projects/railsgirls/
cd ..
pwd
ls -l
#
#
#
#
change into a directory
get out of a directory
print current directory
list the files here
!
•
•
Pay attention to the “current directory”
•
Press tab to complete filenames
Press the up and down arrows to run previous
commands
12. Stay Focused
As a Rails developer, there
are only a handful of
commands you’ll use
regularly.
git
rspec
rake
rails
gem
bundle
irb
ruby
subl / vim
open
sudo
ssh
17. Ctrl-A
Ctrl-E
Alt-Delete
start of the line
end of the line
delete previous word
Works virtually anywhere! * **
* Terminal, Chrome, Sublime, Evernote, Keynote, XCode, LibreOffice, System Preferences, Gnome, KDE, XFCE4…
** Windows? Not sure.
19. Ctrl-R
1. Ctrl-R
2. Start typing (e.g. type “rebas”)
3. Ctrl-R to jump to next oldest match
4. Ctrl-S to jump to next newest match
5. Return to run, Esc to cancel