Opening, saving, and closing buffers
To open a file and load it into a buffer, useC-x C-f, which will
open a prompt in the mini-buffer that says “Find file:
~/path/to/current/directory/”. Just as with switching buffers, you can
press the tab key to list the files in the directory you have
specified if you need to.Find file: ~/learn/shell/
Find file: ~/learn/shell/zip.sh
Press enter, and a new buffer will be created with the file you specified:
File Edit Options Buffers Tools Sh-Script Help
#!/bin/bash
# Zip all the arguments with for loop
for i in $@; do
zip archive "$i"
done
-UU-:----F1 zip.sh All L1 (Shell-script[bash]) -------------------------------------------
Indentation setup for shell type bash
If you make changes to the buffer and you want to save it back to the file on disk, use
C-x C-s:Wrote /home/jtony/learn/shell/zip.sh
No comments:
Post a Comment