ifeffit_shell(3pm)

πŸ’– ifeffit_shell(3pm) β€” bestie edition πŸ’–

okay so this is the manual page for ifeffit_shell, straight out of the User Contributed Perl Documentation section. buckle up, we're learning Unix together and it's gonna be cute. πŸŽ€


✨ NAME ✨

ifeffit β€” Shell Interface to IFEFFIT. that's it, that's the whole vibe. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

so ifeffit is a shell interface to the Ifeffit XAFS Analysis System. you type Ifeffit commands, and they get entered and executed as you type them, which gives you complete access to the Ifeffit library inside a relatively friendly command-line program. like, she's giving approachable, she's giving accessible, we love her for that. 🫢

a sample session might look like this:

 %~>ifeffit
   Ifeffit  1.0004  Copyright (c) 2000 Matt Newville, Univ of Chicago
   Ifeffit Shell  Perl Module 1.2 (ReadLine enabled)
   reading /home/newville/.ifeffitrc ... OK
 Ifeffit> read_data(My.xmu,type=xmu)
 Ifeffit> spline(energy,xmu, rbkg = 1.0, kweight =1 )
 Ifeffit> plot(energy, xmu)
 Ifeffit> plot(energy, bkg)

no cap, that's the whole workflow right there. iconic. ⭐


πŸ’œ DESCRIPTION πŸ’œ

so if you have the Perl module for the ReadLine library β€” and heads up bestie, Term::ReadLine and Term::Readkeys are both required β€” you get to use the command-line editing features of the Gnu ReadLine library. 🧚

and the most important part? this library makes the up arrow scroll through your previous commands. literally the glow-up we all deserved. it also gives you access to the last 300 commands typed in (stored in the file .ifeffit_hist in your home directory) from previous sessions. and the command l [number] shows you the last number commands typed in. πŸ’–

there's also some support for command-line completion via the tab key. while you're typing the first word at the command-line prompt, selected ifeffit commands and shell commands will be 'tab-completed' β€” meaning hitting tab completes as much of a partially-typed command as possible. the list of ifeffit and shell commands recognized for this purpose is customizable. and after the first word has been fully typed, the tab key will complete file names in the current working directory. obsessed. ✨

e.g.:

  %~>ifeffit
    Ifeffit  1.0002  Copyright (c) 2000 Matt Newville, Univ of Chicago
    Ifeffit Shell  Perl Module 1.2 (ReadLine enabled)
    reading /home/newville/.ifeffitrc ... OK
  Ifeffit>

okay now the numbered list, stay with me:

  1. quit and exit will exit the program. bye bestie πŸ‘‹

l lists the history buffer.

? is an alias for help, which will display this document, or give a brief command summary (as in: help plot).

?? lists the known system shell commands that can be executed from within ifeffit. for other shell commands, use the ! character to escape to the system shell. πŸ”₯

  1. the resource file ~/.ifeffitrc (if found) is read at start-up to allow customizations. lowkey important: this file is read as a perl script (not as raw ifeffit commands). to allow further confusion (err, customization) πŸ™ˆ, you can load files of ifeffit commands at startup β€” ifeffit myfile will load the file myfile at start-up, as if you typed load myfile at the command-line. this loading occurs after the ~/.ifeffitrc file is read, which can provide a convenient way to override default macro definitions.
  2. Shell variables: (can be customized in ~/.ifeffitrc)
    • $Escape [default = '!'] β€” a line starting with this character is sent to the shell.
    • $Prompt [default = 'Ifeffit> '] β€” command-line prompt.
    • $HOME [default from Environment Variable] β€” users home directory.
  3. a useful procedure for developing and testing ifeffit scripts is:
        ifeffit> ! emacs script &
                  -- add ifeffit code to script and save the file
        ifeffit> load script

🌸 CUSTOMIZATION 🌸

a typical ~/.ifeffitrc file might look like this:

      #
      # start-up perl for shiffit
        push @shell_commands, qw(emacs grep gunzip diff);
      #
      # pre-load some common ifeffit macros
        ifeffit("load $HOME/.ifeffit_macros ");

this file is "require'd" by ifeffit. the push line adds a few more commands to the default list of shell commands. and the ifeffit line loads a bunch of pre-defined ifeffit macros. periodt. πŸ’…


πŸ‘‘ AUTHOR πŸ‘‘

Matthew Newville β€” newville@cars.uchicago.edu


🌈 SEE ALSO 🌈

  • Term::Readline perl module β€” to use the GNU Readline library to improve reading the command-line and enabling history mechanism. this module is available from Comprehensive Perl Archive Network.
  • Ifeffit.pm perl module β€” to use the Ifeffit XAFS Analysis library from within perl. several applications distributed as part of the Ifeffit Analysis System, including this program, requires this Ifeffit perl module.
  • Ifeffit Reference Manual β€” main reference for the commands of the Ifeffit XAFS Analysis system.

and that's the whole page, bestie 🫢 this was perl v5.40.0, dated 2025-02-16, and it lives at ifeffit_shell(3pm). slay, go read your history buffer, mwah πŸ’‹

πŸ“¦ where this page comes from