Listing 2: .savedirs
set dir_file = ~/.dirstack
set dir_list = ( `dirs` )
set dir_num = $#dirlist
set dir = $dir_list[$dir_num]
echo "if ( -d $dir ) chdir $dir" > $dir_file
@ dir_num--
while( $dir_num > 0 )
set dir = $dir_list[$dir_num]
echo "if ( -d $dir ) pushd $dir >/dev/null" >> $dir_file
@ dir_num--
end
|